Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ASSERT Error ((original_fpscr & 0x7) == 0) in thread_utils.h file while using app_timer with thread SDK example (MQTT-SN publisher)

Hello everyone i am trying to integrate nRF Calendar example with the nRF5 Thread MQTTSN example. In my application, I will get the date and time source from the MQTT-SN JSON payload. I am able to parse the date and time and pass it as an argument to nrf_cal_set_time function. When parsing and passing these values to the function works well and my epoch time gets updated as per the passed value. But the problem arises when I try to re-update the epoch time. When I parse a new date and time and pass it as arguments 2nd or 3rd time the application crashes if the duration of the date-time update is very less. If the duration is more there is no issue in updating the epoch time.

Here is the debug log, I am publishing the data every 5 seconds here. So if I calculate even after 20 seconds I am not able to update the date-time successfully.

Console Output

<info> app: MQTT-SN event: Client has successfully published content.
Date :  16/11/1995   ##Epoch time updated succesfully here
Time :  1:12:00
T: 11/16/95 - 01:12:55
CT: 11/16/95 - 01:12:00
<info> app: MQTT-SN event: Client received content.
<info> app: Topic ID: 1266
<info> app: Length: 82
<info> app: MQTT-SN event: Client has successfully published content.
<info> app: MQTT-SN event: Client has successfully published content.
<info> app: MQTT-SN event: Client has successfully published content.
<info> app: MQTT-SN event: Client has successfully published content.
Date :  16/11/2021  #Recieved new epoch time data
T: 11/16/21 - 01:12:16      #epoch time set and program crashed
CT: 11/16/21 - 01:12:00
<info> app: MQTT-SN event: Client received content.
<info> app: Length: 82


<error> app: ASSERTION FAILED at /home/dnk121/Nikhil/Project/S-Node/SDK/Thread_SDK/nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8/components/thread/utils/thread_utils.c:331

<error> app: ASSERTION FAILED at /home/dnk121/Nikhil/Project/S-Node/SDK/Thread_SDK/nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8/components/thread/utils/thread_utils.c:331

Line 331 indicates   " ASSERT((original_fpscr & 0x7) == 0);}"

A similar sort of issue arrives when I try to stop the app timer configured in repeated mode. 

I am using two app timers one in repeated mode and one in single-shot mode. Repeated app timer will publish data till the single-shot timeout callback handler stops the repeated app timer. It works fine if the repeated app timer is stopped by a single-shot timer. But if I pass a command to stop the repeated timer in between (before the single shot timer expires), it also gives me the same error. 

Can anyone please help me to resolve this issue? 

Parents
  • The issue was with nRF Calendar. Once i set time in nRF calendar integrated thread example, you have to wait for a 1-2 minutes to update or set the time again. Otherwisse it will throw the above mentioned error. 

    In my case, i will be updating timestamp once every 24 hours from the cloud service so it works fine with me. Thanks for the support. 

Reply
  • The issue was with nRF Calendar. Once i set time in nRF calendar integrated thread example, you have to wait for a 1-2 minutes to update or set the time again. Otherwisse it will throw the above mentioned error. 

    In my case, i will be updating timestamp once every 24 hours from the cloud service so it works fine with me. Thanks for the support. 

Children
No Data
Related