2022-11-07 08:47 AM
Hello community,
We are using STM32WL V1.2.0 to develop an application based on the example application "LoRaWAN_End_Node_FreeRTOS". Board: Nucleo-WL55JC1. The example application works.
However, as soon as we add the function "osDelay(2000)" in a thread, the application gets stuck in tasks.c, line 2581:
configASSERT( ( xTickCount + xTicksToJump ) <= xNextTaskUnblockTime );
Steps to reproduce: LoRaWAN_End_Node_FreeRTOS, lora_app.c, line 439: add code:
APP_LOG(TS_ON, VLEVEL_M, "before osDelay(2000)\r\n");
osDelay(2000);
APP_LOG(TS_ON, VLEVEL_M, "after osDelay(2000)\r\n");
We suspect that the ticks are not updated correctly, so that after waking up from sleep, configASSERT() is hit because the system thinks it has missed xNextTaskUnblockTime.
When using FreeRTOS timers osTimerNew(), osTimerStart(), the same happens. The original example application uses neither osDelay() nor osTimerNew(), but only osThreadFlagsWait/Set() functions, and therefore works fine.
FreeRTOS configuration: as in the example application, most notably configUSE_TICKLESS_IDLE = 1.
Any ideas what could be wrong?
Thanks!
Solved! Go to Solution.
2022-11-07 09:10 AM
Hello @JBive.1 , Welcome to the community,
Thank you for your post, we already encounter this issue and we fix it in the next release.
I attach the corrected file.
Best regards
Louis
When your question is answered, please close this topic by choosing Select as Best.
2022-11-07 09:10 AM
2022-11-08 06:14 AM
Hello Louis,
Perfect, the new file app_freertos.c solved the issue.
Do you know when the next release will be published? We are waiting for it 🙂
Thanks a lot!
2022-12-02 02:39 AM
Hello @JBive.1 ,
The new release 1.3.0 is now publish on st.com, you can download it here !
Have a good day
Louis
2022-12-02 05:20 AM
Thanks Louis & team! Have a great day, too,
J