cancel
Showing results for 
Search instead for 
Did you mean: 

Double Word Write Into flash produce error (STM32F429xxx)

Radoslav Mar
Associate II
Posted on July 12, 2018 at 18:15

#define APPLICATION_START_ADDRESS 0x8008000

void flashErase(uint8_t startSector, uint8_t numberOfSectors)

{

   

HAL_FLASH_Unlock();

   

Flash_eraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS;

   

Flash_eraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3;

   

Flash_eraseInitStruct.Sector = startSector;

   

Flash_eraseInitStruct.NbSectors = numberOfSectors;

   

if(HAL_FLASHEx_Erase(&Flash_eraseInitStruct, &Flash_halOperationSectorError) != HAL_OK)

   

{

   

   

Flash_raiseError(errHAL_FLASHEx_Erase);

   

}

   

HAL_FLASH_Lock();

}

int main(void)

{

   

HAL_Init();

   

main_clockSystemInit();

   

__IO uint64_t word = 0x1234567890;

   

flashErase(2, 1);

    HAL_FLASH_Unlock();

    HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, APPLICATION_START_ADDRESS, word);

}

PGAERR flag is raised.

If I try to send 32bit variable it works, but with DoubleWord I get error.

No errors after erase operation.

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 12, 2018 at 21:31

Do you have the external  Vpp applied?

0690X0000060M8JQAU.png

JW

View solution in original post

1 REPLY 1
Posted on July 12, 2018 at 21:31

Do you have the external  Vpp applied?

0690X0000060M8JQAU.png

JW