I'm writing an application that requires dynamic memory allocation, and also needs to sleep in the lowest power mode for a majority of it's lifetime. I'm currently persisting memory banks in system off mode like so:
NRF_POWER->RAMON |= (POWER_RAMON_OFFRAM0_RAM0On << POWER_RAMON_OFFRAM0_Pos) |
(POWER_RAMON_OFFRAM1_RAM1On << POWER_RAMON_OFFRAM1_Pos);
But apparently the heap is not in banks RAM1 or RAM0. Am I mistaken, and if not, how do I persist memory in the necessary bank?