STM32N655 BKPSRAM
Hello,
In my project, I want to hold boot params in BKPSRAM so "Application project" can also write and read this section easily. If boot is needed, "Application project" will set boot params as required and after that it will use "NVIC_System_Reset".
Therefore, I tried to write and read some parameters in this area. I can see the datas is written successfully in "BKPSRAM_BASE_S" section while debugging but when I restart the debug session, BKPSRAM section is all fill with zeros. I know that I am missing something but did not find it.
- STM32N655 custom board.
#define BKP_SRAM_START_ADDRESS ((uint32_t)BKPSRAM_BASE_S)
#define BOOT_PARAMS_PTR ((BootParameters_t*)BKP_SRAM_START_ADDRESS)
/* USER CODE BEGIN Init */
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_RCC_RAMCFG_CLK_ENABLE();
__HAL_RCC_BKPSRAM_MEM_CLK_ENABLE();
HAL_PWR_EnableBkUpAccess();
HAL_PWREx_EnableBkupRAMRetention();
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* Configure the peripherals common clocks */
PeriphCommonClock_Config();
/* USER CODE BEGIN SysInit */
SystemIsolation_Config();
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_HPDMA1_Init();
MX_XSPI2_Init();
/* USER CODE BEGIN 2 */
MX_EXTMEM_MANAGER_Init();
s_boot_params.o_boot_mode = TRUE;
memcpy(&s_boot_params.ab_version[0], k_BOOTLOADER_VERSION, 4);
/* Write to backup ram */
memcpy((void*) BOOT_PARAMS_PTR, &s_boot_params, sizeof(BootParameters_t));
/*Read from backup ram */
// memcpy(&s_boot_params, (void*) BOOT_PARAMS_PTR, sizeof(BootParameters_t));
Update-1: Same problem as in this topic https://community.st.com/t5/stm32-mcus-products/stm32h743-backup-ram-not-saved/td-p/273468
Update-2: I tested my code on STM32N6570-DK and BKPSRAM is retained but I did not figure out the problem on my custom board.
VDD and VBAT connection is managing with internal switch and VDD is always on in my case. (RM,Page:355)
Any help appreciated.
Best Regards.

