Other Parts Discussed in Thread: C2000WARE
Tool/software:
Hello,
I'm currently working with the Flash API on a C2000 F28004x device, and I'm using the Fapi_issueProgrammingCommand() function in Fapi_DataAndEcc mode to program both data and ECC values.
I'm confused about how the ECC values are actually generated and written to Flash in this mode. I have a few questions:
-
When using
Fapi_DataAndEcc, does the Flash API internally generate the ECC values based on the data I provide, or am I responsible for manually calculating and supplying them? -
If I pass a valid ECC buffer to the
Fapi_issueProgrammingCommand()function, will the API write it directly to the ECC memory, or does it still recalculate ECC internally? -
What is the correct way to manually calculate ECC using
Fapi_calculateEcc()? Should I use 64-bit chunks aligned to 64-bit addresses? -
Are there any constraints on data alignment, address alignment, or buffer size when programming data and ECC together?
I’ve noticed that writing in Fapi_AutoEcc mode works fine, but when switching to Fapi_DataAndEcc, verification or subsequent writes may fail unless ECC is handled very carefully. I would really appreciate clarification on the expected behavior and recommended usage pattern.
Thanks in advance!