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: SW Stuck in Fapi_doBlankCheck when trying to update FEE in case of FreeRTOS

Part Number: TMS570LC4357

Hello,

I am facing the same Issue in my application as in the below Forum. I am using FreeRTOS and when I try to do a Fee Write, The SW is stuck in Fapi_doBlankCheck. I found the below forum, Can anyone help me in accessing the .asm file attached in the Forum as I need to make the same changes.

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/632209/rtos-tms570ls1224-call-fee-functions-from-freertos-tasks-hangs

Regards

  • Hi Sakti,

    Fapi_doBlankCheck() is to check the erase state of flash bank. As the erase state of the Flash is not a valid ECC condition, the ECC check and correction must be disabled. But the flash ECC on TMS570LC43x is enabled by default and can not be disabled. We don't suggest using this function in your project.

  • Please find the _svc.asm from the application node: spna218

    www.ti.com/.../spna218.

  • Hello 

    Thank You for your response.

    Fapi_doBlankCheck() is to check the erase state of flash bank. As the erase state of the Flash is not a valid ECC condition, the ECC check and correction must be disabled. But the flash ECC on TMS570LC43x is enabled by default and can not be disabled. We don't suggest using this function in your project.

    1. How can Fapi_doBlankCheck() not be used as this Function is called whenever TI_Fee_WriteAsync is used??

    2. This issue is faced after FreeRTOS Scheduler is started and not before it. This issue happens because we are not able to go to Supervisor mode before writing FEE or because of ECC error??

    3. If switching to Supervisor mode is the problem, Then we need to switch to Supervisor mode before writing FEE and must switch back to User Mode after writing FEE?

    Please find the _svc.asm from the application node: spna218

    www.ti.com/.../spna218.

    3. I cannot access the link provided by you. This asm can be used to switch CPU modes right??

    Regards

  • Hey

    Any updates on this??

    Regards

  • 3. I cannot access the link provided by you.

    It looks like the link has a spurious full stop. http://www.ti.com/lit/zip/spna218 works

  • Hey,

    Can you let me know the answers of the my other two questions. Thanks

  • 1. How can Fapi_doBlankCheck() not be used as this Function is called whenever TI_Fee_WriteAsync is used??

    For performing Blank Check, the ECC correction must be disabled because the erase state of the Flash is not a valid ECC condition on Banks 0 and Bank 1. For device TMS570LC43x, the ECC on Bank0 and Bank1 can not be disabled. On Bank 7, ECC can either be temporarily disabled by writing 0101 to the EE_EDACEN bits or setting the EE_ALL1_OK bit EE_CTRL1 register.

    It s OK to perform blank check for EEPROM (Bank 7).

    2. This issue is faced after FreeRTOS Scheduler is started and not before it. This issue happens because we are not able to go to Supervisor mode before writing FEE or because of ECC error??

    As TRM says that the Flash module control registers can only be read and/or written by the CPU while in privileged mode.

    The F021 Flash APIs must be run in a privileged mode (a mode other than user) to allow access to the Flash memory controller registers. 

    3. If switching to Supervisor mode is the problem, Then we need to switch to Supervisor mode before writing FEE and must switch back to User Mode after writing FEE?

    Yes. Please refer to the example code in spna218.