2021-09-06 11:57 PM
I am currently writing a code to send joystick data from a PC to an STM32 Nucleo board. I use pygame to read joystick values and use the socket library of python to send data to MCU via a router. Both MCU and PC is connected to the router. On the MCU side, I use a modified example code of LWIP given in STM32 Cube pkg. The MCU also runs a FreeRTOS scheduler on which LWIP is running. I was able to get it run flawlessly in a 2 threaded FreeRTOS code. However, when I shift the code to a 16 threaded code[main project], LWIP stops working after a few exchanges. In a sense, I don't receive any ping after 4-5 exchanges.
Some things that were experimented with to resolve the issue
I think, its a memory issue. But not sure how to resolve. can anyone advice me on this ?
Solved! Go to Solution.
2021-09-20 10:12 PM
I was able to resolve this by downgrading to CMSIS v1
2021-09-07 04:37 AM
Update 1: I tried to find out heap utilisation with xPortGetFreeHeapSize() . When the ping stops , it still shows 35kb of unused memory.
2021-09-07 06:11 AM
Update 2 : The code is stuck at a free RTOS assert function
configassert( pxqueue- uxitemsize == 0 )
2021-09-08 06:22 AM
Hello @SSRIN.1 ,
You could perform a stack analysis or activate stack overflow detection in your RTOS in order to rule out a stack issue.
Please refer to this reference which may help you.
BeST Regards,
Walid
2021-09-20 10:12 PM
I was able to resolve this by downgrading to CMSIS v1
2021-09-21 01:45 AM
Hello @SSRIN.1 ,
Good news! Thanks for sharing this.
Can you tell us which version of CMSIS is causing the problem?
BeST Regards,
Walid
2021-09-21 03:17 AM
CMSIS V2
2021-09-21 03:29 AM
Sorry, I didn't explain my question well.
Could you provide the Device Version Number given in the following file: (path: Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f4xx.h)
Example :
/**
* @brief CMSIS Device version number V4.3.3
*/
Thanks in advance.
BeST Regards,
Walid