Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf5-calendar example questions

https://github.com/NordicPlayground/nrf5-calendar-example

What is lowest power mode where real time clock could run?

How could retain RTC value during reset?

Thanks

  • What is lowest power mode where real time clock could run?

     System ON mode, with LFCLK and RTC running. ~ 2-3 µA. 

    How could retain RTC value during reset?

    It will depend on the type of reset. You could try to save the RTC value to a .noinit variable (will not be initialized to zero during startup) that you read at startup, alternatively save the RTC value to flash before the reset, and read it again startup.

  • Hi Sigurd,

    Do you have some example or tutorial about what need to be set for a .noinit variable as I'm receiving  linker errors when try

    uint32_t test_noinit __attribute__ ((section(".noinit")));

    Output/Debug/Exe/ble_app_ss_hid_rtos_pca10040_s112_19.elf section `.noinit' will not fit in region `UNPLACED_SECTIONS'

    region `UNPLACED_SECTIONS' overflowed by 4 bytes

    Also I'm using FreeRTOS in the app that I'm trying to implement RTC at lowest power mode. Does this affect  somehow your previous answer?

    Thanks

  • How does your SES project flash_placement.xml file look like ? 

    Do you have 

    <ProgramSection alignment="4" load="No" name=".non_init" />
    in the file ?

     

    during reset?

     What type of reset are you expecting ?

  • Hi Sigurd,

    yes, I have such line (only attributes order differ): <ProgramSection name=".non_init" load="No" alignment="4"/> 

    Does it mean I have to use ((section(".non_init"))) ?

    About 'Reset' - best if I could handle all types of resets, but for now will be Ok and only for resets which happen when nRF is awakes from seep mode (after button press) and restart which happen when system  when some faults happen without user interference?

    Thanks

  • So with ((section(".non_init"))) tested and work Ok so far with soft resets from code or faults, and give random numbers at power up or reset with the 'Reset' button. Didnt find any implications or side effects so far.

    Is there a way to find with code how was the nRF booted (power on, reset button, soft reset, ..), so to be able to distinguish is it a random number or  number I set before soft reset?

    Thanks

Related