Thank you for your answer.
What i’m trying to do is to evaluate the consomption in function of DRAM bloc retained. I’ll increase my DRAM blocks as my application grows.
You say that I can use DRAM2_TOP and DRAM0 and DRAM1 power in sleep mode. If my application stores data in all DRAM block, i’ll lose them in sleep mode when power is disabled.
there is a sample exemple from onsemi with the same config:
/* Set wake-up application start address (LSB must be set) */
(uint32_t) (&Wakeup_From_Sleep_Application_asm) | 1;
/* Set wake-up restore address */
sleep_mode_init_env.wakeup_addr = (uint32_t) (DRAM0_TOP + 1
/* Configure memory retention */
sleep_mode_env->mem_power_cfg = FLASH_POWER_ENABLE |
/* Configure memory at wake-up (PROM must be part of this) */
sleep_mode_init_env.mem_power_cfg_wakeup = PROM_POWER_ENABLE |
Yes i tried that but when i do:
/* Enable VDDM retention regulator */
sleep_mode_flash_env->VDDMRET_enable = VDDMRET_ENABLE_BITBAND;
/* Select memory instance(s) to be retained */
sleep_mode_flash_env->mem_power_cfg = DRAM0_POWER_ENABLE; // retain only DRAM0
Then i use a counter to be incremented in each wake up, when this counter reaches a fixed value, it toggle a GPIO. this wasn’t the case, i don’t know why. In the map file i have this:
0x2000006c 0x4 ./main.o