2025-12-02 2:54 PM - last edited on 2025-12-03 8:55 AM by mƎALLEm
In the H562 CubeMx setting the flash option bytes only allows flash number of sectors up to 7.
If you look at the FLASH_EDATA_EraseProgram example in the H5 firmware bundle you will see it sets the number of sectors to 8 before calling FLASH_OB_EDATAConfig function. this function decrements by one before ORing the sector enable bits.
Because CubeMx only allows up to seven when it generates code you do not get the full EDATA range.
And if you set 1 in cubemx I guess you do not get any???
2025-12-02 2:55 PM
2025-12-02 5:14 PM
This is a CubeMX bug. It should be allowing 1-8 to be input, not 0-7. Or if it does accept 0-7, then set EDATASize to one more than that.
vs
2025-12-03 8:32 AM
Let me thank you for your contributions.
An internal ticket is submitted to the dedicated team (Internal Ticket Number: Ticket 223076).
Thanks
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.