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: FAPI API to access the FLASH Memory in TMS570LC4357

Part Number: TMS570LC4357


Hi QJ Wang,

I am trying to access a Flash memory using FAPI API F021 

I am getting an error after compile is 

Please help me to resolve this issue .

Thanks in Advance

Santhosh

  • Hi QJ Wang,

    If it enters  Fapi_BlockErase API it disconnect the debug and enters to below picture.

    FapiReturn = Fapi_BlockErase(0x003E0000, 4);

    Please support to resolve this issue.

  • Hi Santhosh,

    Please copy the Flash APIs to RAM.

    You can use the following code to copy flash API section to SRAM:

    extern unsigned int apiLoadStart;
    extern unsigned int apiLoadSize;
    extern unsigned int apiRunStart;

    main()

    {

    /* Copy the flash APIs to SRAM*/
    memcpy(&apiRunStart, &apiLoadStart, (uint32)&apiLoadSize);

    /* Copy the .const section */
    //_copyAPI2RAM_(&constLoadStart, &constRunStart, &constLoadSize);
    memcpy(&constRunStart, &constLoadStart, (uint32)&constLoadSize);

  • Hi QJ Wang,

    Yes, After copy this above functions I have resolved no matching sections error.

    But, After step in to  FapiReturn = Fapi_BlockErase(0x003E0000, 4); function it go to this below error 

    This same code in Bootloader is working fine, but not in application. 

    I am planning to share some data information to bootloader before entering to bootloader from application. 

    So I need to write a data from application to Flash then need to be read in bootloader code.

    Can you please suggest me how to implement  in application side to write a data in flash memory 

    Thanks in advance.

    Santhosh

  • Hi Santhosh,

    Nothing special. You can use the same way as you did in bootloader.