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: Flash写入失效

Part Number: TMS320F280041

     问题1:       在地址:0x8443c写入8个字时异常

                 u32FlashAddr = APP_TESTADDR; //地址:0x8443c
                 oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //写8个字异常
                 写入Flash时返回Fapi_Error_AsyncIncorrectDataBufferLength

                 同样的地址写入4个字却常                

                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0, Fapi_AutoEccGeneration);//写4个字正常

                 如果换个地址写入8个字也是正常的,为什么?

                u32FlashAddr = APP_TESTADDR; //地址:0x84438
                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //换个地址写8个字正常

问题1: 

              当在地址0x85008~0x0x8DFFF之间写入多个字时,全部写完都正常,

                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0,Fapi_AutoEccGeneration);
                while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);  //写入正常

                最后一字是在0x85000写入,却发现没有写入,但返回的状态位却是正确的,为什么会没有写入;代码如下:
                u32FlashAddr = APP_TESTADDR; //0x85000
                oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 1,0, 0,Fapi_AutoEccGeneration);
                while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //没有写入

如果把参数Fapi_AutoEccGeneration换成Fapi_DataOnly,则可以正常写入,但是在读FLASH数据却发生异常中断,代码如下;

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

为什么会这样,如果解决?