I have installed CMSIS_RTX on my Infineon XMC4800 microcontroller (ARM Cortex M4). I have also installed CycloneTCP Tcp/Ip stack on top of it and everything compiles fine. CycloneTCP is a free, opensource library which implements a lot of protocols.
However, when I try one of the examples comming with CycloneTCP for XMC4800, the system hangs when the tcp/ip stack is initialized at the very beginning of the code.
At some place, an OsEventCreate call is made which creates a semaphore. The semaphore is created successfully, but the call to osSemaphoreWait hangs.
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); ...
I am using the correct drivers for my PHY and for my Ethernet Interface.
Does someone know/have the same experience why the system hangs. It seems unlogical because the call to osSemaphoreWait should return immediately when the resource is locked.
I blocks on the instruction BLX R4 in SVC_User() function in HAL_CM4.S
I have little experience in RTOS, so any help is very welcome. I'm glad to hear it if more info is needed.
Thanks for the reply.
I managed already to get the CycloneTCP working with Keil. Indeed, it seemed that my stack and heap sizes were too small. I am still a newby on embedded software etc. So it took me a while to figure it out.
I works like a charm now :-)