2023-06-08 03:30 AM - edited 2023-11-20 03:40 AM
Hi,
We have written the data in Flash Bank 2 sector 7 successfully. Power cycled the board and trying to read the stored data from Flash Bank 2 sector 7 and found Hadrdfault error at 64th byte.
-> The data stored in the form of char.
-> Using HAL library to for flash read and write
Following image represents the memory layout before reading the data. At 64th byte String had "?" and leading to Hardfault error. Even tried the Flash Bank 2 sector 1 and found the same error.
Quick response is much appreciated.
Regards,
Srinidhi H
Solved! Go to Solution.
2023-06-08 04:16 AM
You have to obey the FLASH ECC granularity and write the whole granule at once and only once, otherwise you get an ECC error leading through unhandled NMI to Hardfault.
The 'H7 granule is 256 bits (32 bytes). Read the FLASH chapter in RM.
JW
2023-06-08 04:16 AM
You have to obey the FLASH ECC granularity and write the whole granule at once and only once, otherwise you get an ECC error leading through unhandled NMI to Hardfault.
The 'H7 granule is 256 bits (32 bytes). Read the FLASH chapter in RM.
JW