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.

TMS570LC4357: Read a specified Flash memory in Tms570lc4357

Part Number: TMS570LC4357

Hello,

I’m using F021 API on tms570lc4357. I can write and read data  But when I read data from flash and transfer that to RAM memory, the nError pin become low.

That is my code:

uint8* dataP;

uint32 data;

dataP=((uint8 *) 0x00300000);

data=dataP[0];

What can I do to solve it?

Best Regards

  • Hello Hamideh,

    That is not how you would read from Flash. Please call F021 Flash API to read from Flash.

    E.g.:

    Fapi_StatusType Fapi_doMarginReadByByte(

    uint8_t *pu8StartAddress,

    uint8_t *pu8ReadBuffer,

    uint32_t u32Length,

    Fapi_FlashReadMarginModeType oReadMode)

    Parameters

    pu8StartAddress [in] start address for region to read by byte   ==> this will point to address in Flash

    pu8ReadBuffer [out] address of buffer to return read data by byte u32 ==> this will point to your data buffer in RAM.

     

    Similarly, when you write to Flash,

    Fapi_StatusType Fapi_issueProgrammingCommand(

    uint32_t *pu32StartAddress,  ==> this points to the start address in Flash

    uint8_t *pu8DataBuffer, ==> this points to the data buffer in RAM

    You can find more details about it in the user guide: C:\ti\Hercules\F021 Flash API\02.01.01\SPNU501G.pdf

    best regards,

    David Zhou

  • Hi Hamideh,

    Please read the Error Signaling Module (ESM) status registers to identify the actual cause of the ESM group2/3 error. It is most likely related to an MPU setting that is set up for a 3MB memory size instead of a 4MB size.

    Regards, Sunil

  • Hi Sunil,

    Thanks for your reply. When I read  the falsh memory content,The esm1 staus register1 becomes 8, In MPU setting memory size is set up 4MB.

    Best regards

  • Hi Hamideh,

    Please confirm the contents of all ESM status registers. Please also confirm that you do program the correct ECC for the entire 4MB of Flash memory.

    Regards,

    Sunil

  • Hi David,

    I have used both of these functions, but the nError pin becomes low again.

    Best regards.

  • Hi Hamideh,

    What method do you use to program the Flash memory? How do you generate the ECC for the program? Do you use auto-generation of ECC by CCS while programming, or do you use the linker to generate the ECC?

    Regards, Sunil

  • Hi Sunil,

    I use auto generation of ECC by CCS while programming and

    F021 Api :

    Fapi_issueProgramming((uint32_t *) Address,Data,SizeOfData,0,0,Fapi_AutoEccGeneration);

    to save necessary data.

    Best regards.

  • Hello,

    The CPU also has fault address and fault status registers that indicate what kind of violation resulted in the data abort response from the CPU. Do you get ESM status register 3 becoming 0x8 when you read from the flash and write to RAM? Your previous note said status register 1.

    Regards, Sunil