cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7A3ZIT6 - Can't read/write to BKPRAM (0x38800000)

RRO_Ata
Visitor

Hi everyone! hope you can help me. I have an issue on the STM32H7A3ZIT6.

I already used the BKPRAM on other project, like the STM32H753 and I had no issue, work perfectly.

So I don't understand why it is not OK, here below is what I do to test the BKPRAM : 

(I work on IAR Workbench)

__HAL_RCC_BKPRAM_CLK_ENABLE();	
// unlock backup domain
HAL_PWR_EnableBkUpAccess(); 

// enable the backup SRAM
if (HAL_OK != HAL_PWREx_EnableBkUpReg())
{
	Error_Handler();
}
/* I tried with MPU config enable and disable also,
I tried also with Cache enable or Cache disable. same issue. */
//MPU_RegionConfig();

// Test read and write to backup SRAM
uint32_t magicNumber = 0xAA55;
uint32_t *pBackupSram = (uint32_t *)(0x38800000);
//If I look at the value of the pBackupSram I can see on the watch "unavailable" so I know it will hard fault...

// when I execute the line below I got an hardfault.
*pBackupSram = magicNumber;
if (magicNumber != *pBackupSram)
{
	Error_Handler();
}
*pBackupSram = 0;
if (0 != *pBackupSram)
{
	Error_Handler();
}

I also checked the register value and everything (for me) seems to be good.

I should miss something, that is different between STM32H753 and STM32H7A3ZIT6.

other thing is my clock config that is running full ( 140MHz/280MHz )

Other RAM work well (AXIS, SDSRAM...)

 

Could you please help me ? <3

Best regards

1 ACCEPTED SOLUTION

Accepted Solutions
RRO_Ata
Visitor

Hello, After some tries I just hard reset ( power OFF/ON ) my product and now it's good, with MPU Enabled... I don't understand. Sorry, for now it works well !!

View solution in original post

1 REPLY 1
RRO_Ata
Visitor

Hello, After some tries I just hard reset ( power OFF/ON ) my product and now it's good, with MPU Enabled... I don't understand. Sorry, for now it works well !!