cancel
Showing results for 
Search instead for 
Did you mean: 

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

Nitin007
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

1 REPLY 1
TDK
Guru

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".