Hi we made a project with DA14585. Now we confused about variable definition. What is difference between
uint32_t battVoltageValue __SECTION_ZERO("retention_mem_area0"); and
uint32_t battVoltageValue;
declarations.
And how it behaves in deep sleep and extented sleep?
how it behaves OTP or booter?
And what is maximum size for "retention_mem_area0" ?
Device:
Hi btdev,
The first definition keeps the variable into the Retention-RAM, so the value will be kept in extended sleep mode. The second definition just stores the variable in the RAM, so the value will not be kept in extended sleep mode. There is not any limitation on the size. The DA14585 contains 4 RAM cell and all of them can be retained. Please check the datasheet. In deep sleep mode, only the wake-up controller or the POR circuit remains switched on depending on the option selected. This mode can be used for the shipping or hibernation mode. A BLE connection cannot be maintained and the System-RAM is switched-off, so the variable cannot be retained. You can also store the variable into initialized section of the retention-RAM, so the value can be kept in a reset/reboot. Please take a look atSW Example: DA14585/586 Detect the Source of the Resetexample.
> > >如何表现OTP或橄榄球员吗?
Can you please clarify this question? Which sleep mode are you using? From where the device boots?
Thanks, PM_Dialog