2018-01-17 09:11 AM
Hello, I am using the STM32F427IG with 1MB of flash with the following configuration:
DB1M(dual bank mode) option byte ON
BFB2(run from bank2) option byte OFF
Looks like that when I write to the BANK2 with the following function the dual bank mode RWW(read while write) doesn't work, as the LED toggle inside the systick functions stop until the erase of some banks is over.
Where I am wrong ? I am running the code from the BANK1
I erase with the following function:
void eraseBank2Sectors{
FLASH_EraseInitTypeDef EraseInitStruct;
EraseInitStruct.TypeErase = TYPEERASE_SECTORS; EraseInitStruct.VoltageRange = VOLTAGE_RANGE_3; EraseInitStruct.Sector = FLASH_SECTOR_17; EraseInitStruct.NbSectors = 3; APP_Printf('BTL: FLASH erasing on bank2 sector 17,18,19...\n'); if (HAL_FLASHEx_Erase_IT(&EraseInitStruct) != HAL_OK){ APP_Printf('BTL: FLASH erase on bank2 FAIL \n'); }and the systick handler as the following:
void SysTick_Handler(void)
{ HAL_IncTick();GPIO_TOGGLE_UP_LED_HEARTBEAT();HAL_SYSTICK_IRQHandler();}2018-01-18 09:35 AM
Solved