Problem with Netcore and MCUBoot from NCS 1.9.1

Hello,

We have an application built with MCUBoot running on a nRF5340. We have used NCS v1.7.0 and NCS v1.9.1 versions for our devices.

All MCUBoot, app core image and net core image have been built and flashed together with NCS v1.9.1 Since we have some fringe issues on NCS v1.9.1 (stack corruptions on low temperature), we decided to temporary fall back to NCS v1.7.0 where we don't see these issues.

So for existing devices we build the app image and net image with NCS v1.7.0 and update the devices in the field (bootloader stays the one built with NCS v1.9.1) On this combination we now have the issue that after 8:30 minutes (or ~512 seconds...) the communication to the netcore fails and we don't get responses anymore when requesting temperature or BLE communication. This issue however does not happen if both bootloader and application images are fully built with v1.7.0 or v1.9.1 respectively.

Since the issue happens exactly at 8:30 minutes on netcore it can be related to timers and rollovers. We checked the configs between these versions too but there are no obvious changes or we miss some information here.

Any idea how to debug this issue? or has anyone faced issue like this?

Regards

djgj 

  • Hi djgj,

    I have not been able to find any indication of what this issue could be from the code, but as you write 512 seconds, that is the time it will take the RTC to overflow with a prescaler value of 0. Can you check with a debugger which RTC instances are enabled, and dump the configuration registers? For instance, is compare or overflow pushed (and revived somewhere) or interrupt enabled for them? And how does this differ between your applications built for the two SDK versions?

    Einar

  • Hey Einar,

    you are absolutely right, the overflowing RTC was the issue. In the bad combination the interrupt for overflow was enabled but I guess there was no handler to ack it and it continued firing.

    I guess it was somehow configured through the v1.9.1 based booloader and not properly reset in the v1.7.0 based application.

    After manually disabling it on start everything works fine again.

    Thanks for hinting us in the right direction!

    Best Regards

    Joe

Related