AM2634-Q1: Issue when adding ECC at ATCM0 in SBL

Part Number: AM2634-Q1
Other Parts Discussed in Thread: AM2634

Could you please help get support for following subject in regards to enabling ECC for TCMA and TCMB for Core 0 AM2634. I am enabling ECC check for TCMA memory in the SBL and upon ECC init have the safety error immediately set even before the test code which injects ECC error. I have disabled the interrupt for the ESM and only configuring the Safety Error pin to activate on error.

 

If I run the TI example for ECC as an app image, the example runs fine

 

In our project, we have SBL which boots autosar image, hence we are enabling ECC on memories before booting the Autosar Application image on R5F. So if I copy related code for the ecc example listed above, when I am executing ECC Init on the memories, the safety error on AM2634 on launchpad gets triggered. This should not be happening for the init stage, but when we are injecting the error.

 

 

When the SDL_InitMemory executes I have an error generated on Safety Error Pin on launch pad and Led goes red. Online I read that the ATCM0 example may have issues in SBL, as we need to enable ECC before Memory Initialization, I tried it and still have an issue

 

  • Hi Royston,

    We came across this issue very recently, and our team working internally.

    The issue exactly happening right after SDL_ECC_memoryRefresh API:

    After this API the error bits in R5SS0 ECC_AGG are getting SET and also that setting ESM RAW status bits like as i highlighted above.

    The root cause i am suspecting here is that, till before this function there is no proper ECC for the memory and after executing this function only we will get valid ECC values for the corresponding memory. However, if we verify this function, first we are reading the values and then we are writing the same value to the memory address to generate proper ECC, but my understanding is that while reading first itself there will be ECC verification can happen and that will create ECC errors like correctable and uncorrectable.

    We are working for solution now and will provide fix soon.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagdish,

    This is a bit strange, as the SDL example passes for me without the ESM error when I run it as an app. For this I put the launchpad in Dev Boot mode, Gels initialize MCU, then run the SDL_Ecc_R5_atcm0 example and it works fine. The issue arises only when I take all the code and make it part of SBL (I used the QSPI Fast boot SBL), then flash the image SBL to QSPI memory, QSPI boot mode, then have this issue of ECC_init API setting the ESM. Are you observing the issue even with the application for SDL_Ecc_R5_atcm0 example?

    Regards

    Roy

  • Hi Royston,

    Are you observing the issue even with the application for SDL_Ecc_R5_atcm0 example?

    I am facing this issue if i operated my board (AM2634 CC) in Dev boot mode. And there is no issue if i use this application with along SBL (QSPI boot mode).

    I am digging into more details now and will provide more updates soon.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagdish,

    What I meant is the example for ECC is copied into SBL QSPI fast boot example. Compiled code is SBL with the ECC included as a TIIMAGE, then flashed into QSPI memory, then subsequent boot from QSPI this SBL image doesnt work for me and gives the error I mentioned.

    In DevBoot mode if I run the ECC example on launchpad I have no issues and it works as expected. Please let me know if you would like to have a call to demonstrate this to you.

    Regards

    Roy

  • Hi Roy,

    Is it possible to share your complete project for quick debugging at my end? If this is not possible, then let me know your free time to connect.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagdish,

    I can share the project, Do you have an internal link I can upload to? 

    Regards

    Roy

  • Hi Roy,

    I shared the internal link to upload your code, 

    could you please upload it soon?

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagdish,

    For some reason your email went into Spam, glad you messaged as I was just going to message you again for the link. I will upload the whole project again, I am using it for launchpad, but am sure it can also run on CC.

    Regards

    Roy

  • Hi Roy,

    Thanks for your project. And i was able reproduce your issue at my end with your project.

    The issue exactly happening right after SDL_ECC_memoryRefresh API:

    In your project also the issue exactly happening with memory refreshment.

    After memory refreshment function execution in SDL_ECC_initMemory API, ECC correctable and Uncorrectable statuses in MSSCTRL ECCAGG are setting like as i highlighted above. 

    And these errors also setting RAW ESM status bits at 0x52D00420 (they are 47 and 48 bits).

    So, once we did ESM initializations these raw status bits will create ESM events (like interrupt generation or error pin activation).

    The solution for this is that we should need to clear out ECC correctable and Uncorrectable statuses in MSSCTRL ECCAGG registers after immediate memory refreshment like as shown below.

    If we did this modification, then error pin activation will happen at only injection phase.

    I am uploading my modified project for your reference in the same link that i shared to you on other day, please do the testing and provide your feedback.

    --
    Thanks & regards,
    Jagadish.

  • Thank you Jagdish, this resolved the issue. I will test the remaining ECC memories with the ESM and let you know for those