This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

In S110 SoftDevice, NRF_POWER->SYSTEMOFF is written. Why?

Hello.

I'm now writing a software based on nrf51_sdk_v6_1_0/nrf51822/Board/nrf6310/s110/ble_app_hrs. The SoftDevice I'm using is s110_nrf51822_7.1.0_softdevice.hex. Why I use the version is that the target device is IC revision 2. Exactly speaking, it is nRF51822 QFAAG20 (0x0057).

When I run the code, it is working for a while (just advertising without connection). However after a few minutes later, the software crashes by HardFault. When I checked the stack area, I noticed that the RAM Block 0 and 1 looked all filled with zero. I suspected that NRF_POWER->RAMON had a wrong value but it was 0x00000003. It looked fine. However, I also noticed that the memory area would be preserved when I reset the target. Finally I noticed that writing 1 to NRF_POWER->SYSTEMOFF caused a similar phenomenon.

So I had a watchpoint on the NRF_POWER->SYSTEMOFF (0x40000500) and reran the code. By the watchpoint, I found that a code in the SoftDevice was writing 1 to the SYSTEMOFF register. It is the following code.

0x00011328: ldr r1, [pc, #424]  ; 0x114d4
0x0001132a: movs r0, #1
0x0001132c: str r0, [r1, #0]

I also confirmed that the code was called in the IRQ #11 context (RTC0_IRQ).

I guess that there is an intention that SoftDevice triggers the SYSTEMOFF, but I don't imagine the reason.

FYI, I suspected that heap or stack area was flooded but it looked okay.

Could you please let me know when and why SoftDevice triggers the SYSTEMOFF? (Do we still have a way to access RAM even though SYSTEMOFF == 1?)

Best Regards,

Atsushi

Parents
  • Hi Atsushi,

    sorry for hijacking your thread but I am having similar issues with the nrF51822 QFAA Gx0 (0x3C) using the softdevice 8.0.0. (Hangup after some time)

    Is there a reason why you are staying on 7.1.0, because when looking at nRF51 Series Compatibility Matrix in Version 1.2 a nRF51 IC rev. of 3 is recommended for a softdevice > 7.0.0 anyway.

    In the release notes of the S110 in rev. 8.0.0 it is only noted that IC rev. 1 is not supported anymore.

    It would be very interresting to get an information what if there are any limitations when using softdevice version > 7.0.0 with IC ref. 2.

    BR Mathias

  • Hi Mathias,

    Thank you for commenting! The reason why I'm sticking to the version is, unfortunately the 8.0.0 demo code did not work at all in my environment. I was thinking I should try 8.0.0 later again when my application worked fine based on the 7.x.0. (I need to run the my application for a customer demo ASAP...)

    Thanks again and Best Regards,

    Atsushi

Reply Children
No Data
Related