Skip to main content
Associate II
July 30, 2024
Solved

STM32H757 'FLASH_TYPEPROGRAM_BYTE' undeclared (first use in this function)

  • July 30, 2024
  • 1 reply
  • 1837 views

Hello,

I am getting an error in HAL_FLASH_Program, error: 'FLASH_TYPEPROGRAM_BYTE' undeclared (first use in this function); did you mean 'TYPEPROGRAM_BYTE'?

why is this programming type not supported FLASH_TYPEPROGRAM_BYTE. Can anyone suggest a solution for this issue.

Attached the screenshot below,

Nitin007_1-1722320830545.png

Thank you in advance for your assistance!

Best answer by TDK

This is not a bug. Flash can only be written to in double-words. This is due to the ECC calculation.

TDK_0-1722338181253.png

 

Solution is to write the entire flash word padded with 0x00 or 0xFF.

1 reply

TDK
TDKBest answer
Super User
July 30, 2024

This is not a bug. Flash can only be written to in double-words. This is due to the ECC calculation.

TDK_0-1722338181253.png

 

Solution is to write the entire flash word padded with 0x00 or 0xFF.

"If you feel a post has answered your question, please click ""Accept as Solution""."