Hello, Experts,
I have a problem to program a ceatain data to memory which is not 128-bit aligned address.
For example, I've already known that a max of two words can be programmed at a time under the address is "128-bit aligned address + 6".
If I should program 2 words to the address, 0x0009801E, like below,
I've end up with failure when write the code as shown below
uint16_t SrcBuffer[8] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF} SrcBuffer[0] = PROGRAM_WORD1; SrcBuffer[1] = PROGRAM_WORD2; uint32_t u32startAddr = 0x0009801E; oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32startAddr, SrcBuffer, 2, 0, 0, Fapi_AutoEccGeneration); // // Wait until the Flash program operation is over // while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); if(oReturnCheck != Fapi_Status_Success) { // // Check Flash API documentation for possible errors // return -1; }
How do I use the flash api, Fapi_issueProgrammingCommand, to program the supplied data to not-aligned memory address in the right way?