cancel
Showing results for 
Search instead for 
Did you mean: 

LoRaWAN_End_Node_FreeRTOS application: configASSERT() in tasks.c when calling osDelay() function

JBive.1
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Louis AUDOLY
ST Employee

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.

View solution in original post

4 REPLIES 4
Louis AUDOLY
ST Employee

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.

JBive.1
Associate II

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!

Louis AUDOLY
ST Employee

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

JBive.1
Associate II

Thanks Louis & team! Have a great day, too,

J