This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P650SH: Flash rewrite failed

Part Number: TMS320F28P650SH

Hi TI,

     I use FlashAPI to write uint64_t data (non-zero) into flash memory at a certain address (e.g. 0x000B0000~0x000B0003), and it can be written successfully. I then use Flash API to write uint64_t data (0) to that address again, and the data at that address does not change to 0. My understanding is that flash can be written from 1 to 0, so why can't it be written to 0 and what should I do about it?

Best regards,

Thanks!

  • Hi,

    Did you write using AutoECCGeneration mode? What is the STATCMD register value after 2nd write?

    Regards,

  • Hi Lydia,

    Yes, I am using AutoECCGeneration mode. oReturnCheck returns Fapi_Status_Success, but the data in the flash memory does not change.

    Best regards,

  • Hi

    This mode will program the supplied data in Flash along with automatically generated ECC. The ECC is calculated for every 64-bit data aligned on a 64-bit memory boundary. Hence, when using this mode, all the 64 bits of the data should be programmed at the same time for a given 64-bit aligned memory address. Data not supplied is treated as all 1s (0xFFFF). Once ECC is calculated and programmed for a 64-bit data, those 64 bits can not be reprogrammed (unless the sector is erased) even if it is programming a bit from 1 to 0 in that 64-bit data, since the new ECC value will collide with the previously programmed ECC value. 

    Also please note that, Fapi_issueProgrammingCommand() function does not check STATCMD after issuing the program command. Fapi_checkFsmForReady() returns the status of the Flash State Machine indicating if it is ready to accept a new command or not. The primary use is to check if an Erase or Program operation has finished.

    The user application must check the STATCMD value when FSM has completed the program operation. STATCMD indicates if there is any failure occurrence during the program operation. The user application can use the Fapi_getFsmStatus function to obtain the STATCMD value.

    Regards,

  • Hi

    Thank you! If I want to reprogram all of this 64-bit data to 0, can I do it and if so what should I do?

    Best regards,

  • You need to erase it and then write.

    Regards,