Part Number: TMS570LC4357
Hi,
I am facing an issue when using F021 APIs to execute the following sequence:
1. Read an address in Bank0.
2. Erase a sector with the address used in Step 1.
3. Write to the address read in Step 1 (and erased in Step 2).
4. Read the data written in Step 3.
All the above operations are performed on the same Bank0 address. In the above sequence, the F021 APIs called for the erase and write operations (Steps 2 and 3) do not return an error but the data is not erased from/written to the Flash. If I skip Step 1, the erase and write operations go through and read executed after the write (Step 4) also returns the correct data. Does reading from an address before an erase/write operation cause a problem?
I am using the Fapi_doMarginReadByByte() API (with Fapi_NormalRead margin mode) to read from the Flash Memory. Is it necessary to call the Fapi_setActiveFlashBank() and Fapi_enableMainBankSectors() APIs before invoking the read function? Also, should the FAPI_CHECK_FSM_READY_BUSY and FAPI_GET_FSM_STATUS checks be made after the Fapi_doMarginReadByByte() call?
Would appreciate your help in this regard.
Thanks and Regards,
Vimal
