2023-12-07 12:12 AM
Hi,
I am trying to flash STM32H563ZI, (NUCLEO-H563ZI) but I get hard fault error
I will flash to BANK2 that starting address 0x081000000
MY CODE;
HAL_FLASH_Unlock();
erase.TypeErase = FLASH_TYPEERASE_SECTORS;
erase.Banks = FLASH_BANK_2;
erase.Sector = 0;
erase.NbSectors = 1;
if (HAL_FLASHEx_Erase(&erase, §or_error) == HAL_OK)
{
HAL_FLASH_Program(FLASH_TYPEPROGRAM_QUADWORD, 0x0810A000, 0x11111111);
}
HAL_FLASH_Lock();
Thanks for your attention
Solved! Go to Solution.
2023-12-10 12:01 PM
Thanks for reply, I figured out why it happens
because of Voltage scale range macro 1 is selected before it is 200 mhz
but my processor is 250 mhz chosen and I need to select Voltage scale range as "0"
2023-12-07 02:19 AM
Hello @Recep,
Please check the STM32CubeH5 examples in Flash > FLASH_EraseProgram
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-10 12:01 PM
Thanks for reply, I figured out why it happens
because of Voltage scale range macro 1 is selected before it is 200 mhz
but my processor is 250 mhz chosen and I need to select Voltage scale range as "0"