cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 Flash EraseSector Reset Problem

mtopcuoglu
Associate

 

Hello everyone,

I am working with an STM32H743VIT6V processor and attempting to erase sector 7 of the flash memory using the following parameters:

 

FLASH_EraseInitTypeDef EraseParams;
EraseParams.TypeErase = FLASH_TYPEERASE_SECTORS;
EraseParams.Banks = FLASH_BANK_1;
EraseParams.Sector = FLASH_SECTOR_7;
EraseParams.NbSectors = 1;
EraseParams.VoltageRange = FLASH_VOLTAGE_RANGE_3;

 

I have tested and confirmed that these parameters work properly on other processors with the same part number. However, on a new processor I received with the same part number, I noticed that calling the EraseSector function causes a reset. After investigating the issue, I found that on this problematic processor, the VoltageRange parameter only works with the value FLASH_VOLTAGE_RANGE_4. Other values cause the reset. Additionally, I observed that on processors where FLASH_VOLTAGE_RANGE_3 works correctly, using FLASH_VOLTAGE_RANGE_2 leads to the same issue.

Is it correct to use FLASH_VOLTAGE_RANGE_4 for the STM32H743VIT6V processors that I will be working with?

1 REPLY 1
STOne-32
ST Employee

Dear @mtopcuoglu ,

 


I believe your code has a Watchdog activated and the period time is not enough for the flash sector erase or may be a bit long enough timeout to allow the flash sector taking the maximum delay . Indeed based on each device a software should take into consideration the maximum value we put in datasheet and not typical .  This may explain the behavior as changing the “Range” is just changing the “parallalism” : 0 corresponds to 8-bits , and 4 corresponds to 64-bits . Here are the timings 

IMG_0192.jpeg

You can see as example Range3 corresponds to x32 that means typical parts may finalise erase  of 128KB sector within  1.1 seconds , but other may last 2,2 seconds . Increasing the Range4 will shorten that time and Range2 ( 16-bits) will increase it .  power consumption you can see in table 149 will have an opposite dynamic.  Hope it helps you .

Cheers,

STOne-32