XMC4800 + (Rasperry Pi) + cycloneTCP tcp/ip stack

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable

To start with, a bit of background information:

I have a RaspberryPI with Apache webserver installed serving a webpage which sends messages to the activeMQ server using MQTT over websockets.
ActiveMQ is also installed on the RPi and it receives the messages. So this is working correctly.

What I like to achieve is that I can subscribe my XMC4800 to the activeMQ server such that I can receive these messages on the XMC4800.

Therefore, I have installed CMSIS RTX (Dave App) and also installed the CycloneTCP library* on my microcontroller. CycloneTCP is fully compatible with Infineon XMC microcontrollers and it has even some example code for the XMC4800.

Everything compiles fine and the CMSIS RTX example from the app runs correctly.
However, when I try to run the CycloneTCP example it seems that the microcontroller is blocking (?) while initialising the TCP/IP stack.

Code fragment of my main function:

int main(void) {
DAVE_STATUS_t status;

status = DAVE_Init(); /* Initialization of DAVE APPs */


//Initialize kernel

if (status == DAVE_STATUS_SUCCESS) {

error_t error;
OsTask *task;
NetInterface *interface;

MacAddr macAddr;

Ipv4Addr ipv4Addr;

//TCP/IP stack initialization
error = netInit();

The source of the netInit() function ( http://www.oryx-embedded.com/doc/net_8c_source.html#l00101 ) executes on line# 120 the method below

* @brief Create an event object
* @param[in] event Pointer to the event object
* @return The function returns TRUE if the event object was successfully
* created. Otherwise, FALSE is returned

bool_t osCreateEvent(OsEvent *event)
//Create a binary semaphore object
event->id = osSemaphoreCreate(&semaphoreDef, 1);

//Check whether the returned semaphore ID is valid
if(event->id != NULL)
//Force the specified event to the nonsignaled state
osSemaphoreWait(event->id, 0);
//Event successfully created
return TRUE;
//Failed to create event object
return FALSE;

The call to osSemaphoreWait(event->id, 0) does not return. However, the second parameter tells me that it should return immediately.
It seems that the micrcontroller is waiting for something but I cannot figure out what it could be.

I have little experience with RTOS and Networking, but if someone could help me with this, I would very much appreciate it.
I have debugged this to the very bottom and it ultimately blocks on the call to the assemby instruction BLX R4:


Maybe some extra usefull information:
- raspberryPi has a static IP address ( and is connected using a crossover UTP cable with the XMC4800
- cycloneTCP has the appropriate drivers included for the PHY (ksz8081.h) and for the network interface (xmc4800_eth.h)

*CycloneTCP is a free (for non-commercial use) open-source full tcp/ip stack from http://www.oryx-embedded.com
3 Replies
Not applicable
To investigate my problem further, I have made a Dave application with the HTTP_SERVER and LWIP apps. This works fine out of the box.: I can browse to the default webpage.

However, when I add the CMSIS_RTOS, I cannot browse anymore to the default webpage. I suspect I have nothing to do in my main() function except for starting the kernel with osKernelStart(); ?
Even a simple ping doesn't work anymore.
During debugging, the tcpip_thread(void *arg) method is executed and the messages for TCP_CONNECT and TCP_BIND are processed. Then, it seems no connections are accepted anymore.

Is there someone who can help me? What am I doing wrong ?

Not applicable
I got an answer from the forum of Keil and someone says the following:

Some early Infineon XMC4 devices required special handling.

When you select an Infineon XMC4 device in uVision it should automatically select the appropriate RTX library.

Therefore check first if you have the correct device selected and the Infineon specific RTX library is used.

You should see the RTX_CM3_IFX.lib or RTX_CM4_IFX.lib in your project.

At least a starting point... Maybe, instead of DAVE 4, I better use the Keil uVision 5 IDE and see if it helps.
Not applicable
Hi Dimitri,

If you make use of Keil MDK-ARM, then you can upgrade the Oryx-Embedded::Middleware software pack to version 1.7.6. There are some example projects that demonstrate CycloneTCP + CMSIS-RTOS directly on the XMC4800 Relax Kit (HTTP server + MQTT client + SNMP agent):