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.

TMS320F28379D: Flash API Fapi_calculateEcc() not working

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

I am trying to test the Flash ECC Logic using the Self Test Libraries. I followed the example from the diagnostics folder in C2000Ware_1_00_01_00. The main difference in my project from the example project is that I am loading from Flash and I have converted it to EABI format.

I have made sure to run Fapi_initializeAPI() before running any other function.

When running Fapi_calculateEcc() the returned ECC value is 0 and the test fails. If I run the example project and call Fapi_calculateEcc() with the exact same parameters the returned ECC value is 160. I can hardcode 160 in my project and the test will pass.

Is there any other steps I need to follow before calling Fapi_calculateEcc() when loading from Flash instead of RAM? Or when the format is EABI instead of COFF?

Thanks!

Brycin Silvester

  • Brycin,

    When you say "I am loading from Flash", do you mean you are executing the flash API from flash?  

    When you say " If I run the example project and call Fapi_calculateEcc() with the exact same parameters the returned ECC value is 160":  I assume this example is COFF example.  Correct?

    Thanks and regards,
    Vamsi

  • Hey Vamsi,

    I just mean that my project uses the flash linker file instead of the ram linker file.
    Yes the example project is COFF.

    Thanks!

  • Hi Brycin,

    In your flash linker command file, you need to make sure the flash API library is mapped to load from flash but mapped to RAM for execution.

    Please check.

    Thanks and regards,

    Vamsi

  • Here is what I tried and unfortunately it still doesn't work:

    flashAPI :
    {
    ../F2837x_FLASH/src/lib/bit/pbit.obj (.text)
    ../F2837x_FLASH/src/drv/sta/sta_user.obj (.text)
    ../F2837x_FLASH/src/drv/sta/sta_tests.obj (.text)
    -l ../src/F021_API_F2837xD_FPU32_EABI.lib (.text)
    } LOAD = FLASHH,
    RUN = RAMGS11_12,
    LOAD_START(FapifuncsLoadStart),
    LOAD_SIZE(FapifuncsLoadSize),
    LOAD_END(FapifuncsLoadEnd),
    RUN_START(FapifuncsRunStart),
    RUN_SIZE(FapifuncsRunSize),
    RUN_END(FapifuncsRunEnd),
    ALIGN(8)

    I have confirmed that Fapi_initializeAPI() works correctly by initializing the return status to Fapi_Status_FsmBusy before calling the function and verifying that the return status gets updated to be Fapi_Status_Success after the function returns. It seems that Fapi_calculateEcc() just isn't working in the library that I am using: F021_API_F2837xD_FPU32_EABI.lib but works fine in the COFF library: F021_API_F2837xD_FPU3.lib. 

    Fapi_initializeAPI() and Fapi_calculateEcc() are the only two function that I am currently trying to use from that library.

    Is there something else that you can think of that I can try?

    Thanks!

    Brycin

  • Hi Brycin,

    For now, you can use ECC Calculation Algorithm mentioned in Appendix E of the flash API guide: http://www.ti.com/lit/pdf/spnu629 

    We will be able to check the Fapi_CalculateEcc() in June.

    Thanks and regards,

    Vamsi

  • The CalcEcc() function in Appendix E solved my problem. Thank you!