STM32F405 BKPSRAM Random values after initialize
Hello,
I have a strange issue with backup ram in F405. It is battery powered after main power off.
When i remove battery and power up board, whole bkpram contains values of 0 - this is normal. But after initialize procedure whole memory contains random values.
This is very strange, because during normal work (with battery connected) i can write data to it, switch power off and all my data remains after next power up.
It's my initialize function:
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_BKPSRAM, ENABLE);
PWR_BackupAccessCmd(ENABLE);
PWR_BackupRegulatorCmd(ENABLE);
while ((PWR->CSR & (PWR_FLAG_BRR)) == 0);
