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

nRF52832 ram_retention demo not working with factory supplied hex file

Hello. We are now starting our review to customize code for the pending use of the Nordic devices in low power mode. Have a mix of Nordic kits now. Using the nRF52832 (PCA10040) kit, downloaded the nRF5_SDK_14.2.0 which offers the ram_retention demo for PCA10040 and PCA10056 (nRF52840 based kit).

The nRF52840 pre-compiled hex file appears to work as documented when applied on the PCA10056 nRF52840 Preview DK.

LED #1 turns ON upon a reset -> a few seconds later -> LED #1 turns OFF. All LEDs are OFF. PB # 1 press turns on LED #2. This is the correct behavior.

Repeat the above using the factory PCA10040 firmware (nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\peripheral\ram_retention\hex) on the nRF52832 kit and the results are:

LED #1 turns ON upon a reset -> a few seconds later -> ALL LEDs turn ON (this is wrong behavior). PB # 1 press turns on LED #2. This is the correct behavior.

In attempting to debug to the best of our limited knowledge, the hard fault is being triggered - if we comment out that routine, the "all leds on" is no longer being enabled.

What is the issue here? Something local with our kit or silicon revision?

What we wish to achieve is to place the pending nRF52832 based module to sleep to save power (wish to run off coin cell battery for as long as possible) -> upon receiving a port pin toggle / trigger -> wake up the Nordic based module and broadcast a value of xx and than back to sleep again. For now, wish to evaluate the power down / up modes.

Will keep testing and update this post if the results change for the better Slight smile

Thanks in advance for any feedback.

Parents Reply Children
  • Hello Martin. Thanks for your reply.

    1)  Yes, on step 3 - all LEDs are on but only if we use the PCA10040 kit. Would you please test the same .hex file (drag & drop) from the hex folder for the ram_retention example? LED1 will be on for about a second and then all LEDs are on.

    We have tested the pre-compiled example supplied with SDK 14.2 and also older SDK 11.0 with the same results.

    2) From our IAR debug trace, it appears that the following routine is being called - when we halt the trace, the while(1) perm loop inside this routine is where we end up.

        // This code will only be reached if System OFF did not work and will trigger a hard-fault which will
        // be handled in HardFault_Handler(). If wake the up condition is already active while System OFF is triggered,
        // then the system will go to System OFF and wake up immediately with a System RESET.
        display_failure();

    3) If we drag & drop the pre-compiled code example from the hex folder for the PCA10056 kit, all LEDs do not light up so this must confirm the Nordic CPU did indeed enter OFF state?

    4) Not clear on the difference between the HardFault_Handler() and this display_failure(void).

    5) We do not believe we have the proper tools to confirm the lower power consumption of your processor. Is the Power Profiler kit (shield p/n NRF6707) suitable to use with the PCA10040 & PCA10056 kits? Can we then observe in real time the power being consumed by the processor?

Related