Other Parts Discussed in Thread: TMS570LS3137
I am porting existing code which executes without any issues on TMS570LS3137 to TMS570LC4357. I am able to initialize flash banks, erase, 64-bit writes, 64-bit aligned reads successfully.
However, if I write to the flash 4-bytes at a time to contiguous addresses the Fapi_issueProgrammingCommand() call fails because (FAPI_GET_FSM_STATUS != Fapi_Status_Success). FAPI_GET_FSM_STATUS = 48 (undefined?).
eg: 2 partial (4-byte) writes at address 0x320050:
- Bank1 sector erase: 0x320050 = 0xff 0xff 0xff 0xff 0xff 0xff 0xfe 0xff --> success
- 1st read-modify-write data= {0x1 0x2 0x3 0x4} : 0x320050 = 0x1 0x2 0x3 0x4 0xff 0xff 0xfe 0xff --> success
- 2nd read-modify-write data= {0x5 0x6 0x7 0x8} : 0x320050 = ? --> fails with FAPI_GET_FSM_STATUS = 48
I expected the final contents to be 0x320050 = 0x1 0x2 0x3 0x4 0x5 0x6 0xf 0x8
I use the following API to write:
while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy ); while( FAPI_GET_FSM_STATUS != Fapi_Status_Success ); if(FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmReady) { status = Fapi_issueProgrammingCommand( reinterpret_cast<uint32_t*>(0x320050), local_buffer, 8, nullptr, 0, Fapi_AutoEccGeneration); while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy); while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);
Can you please provide some pointer regarding what I may be doing wrong?