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.

TMS320F280041: Failure occurred when I wrote into Flash

Part Number: TMS320F280041

Hi Team,

Question 1. Abnormalities occurred when I wrote 8 words into the address 0x8443c.

                 u32FlashAddr = APP_TESTADDR; //address: 0x8443c
                 oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //Abnormalities occurred when 8 words were written.

When I wrote into Flash, "Fapi_Error_AsyncIncorrectDataBufferLength" was returned.

But everything went well when I wrote 4 words into the same address.             

                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0, Fapi_AutoEccGeneration);//Everything went well when 4 words were written into the same address.

Everything also went well when I wrote 8 words into another address. Why?

                u32FlashAddr = APP_TESTADDR; //address: 0x84438
                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //Everything went well when 8 words was written into another address.

Question 2: When multiple words were written between the addresses 0x85008~0x0x8DFFF, all could be written into these addresses, and everything went well.

                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0,Fapi_AutoEccGeneration);
                while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);  //Nothing was wrong with the writing.

The last word was supposed to be written into 0x85000, but I found that it was not written into this address, but the returned status bit was correct. Why was it not written into this address? The code is as follows:


                u32FlashAddr = APP_TESTADDR; //0x85000
                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 1,0, 0,Fapi_AutoEccGeneration);
                while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //It wasn't written into the address.

When the parameter "Fapi_AutoEccGeneration" was replaced by "Fapi_DataOnly", it could be written into the address successfully, but an abnormal interruption occurred when I was reading FLASH data. The code is as follows.

                u16Value = (*(Uint16 *)(APP_CHECK_ADDR));

Why would this happen? Could you please offer me a solution?

Kind regards,

Katherine