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.

CCM self-test always fails

Other Parts Discussed in Thread: HALCOGEN

Hi all,

We are having a problem with the CCM self-test code. There is a self-test that always fails.

 

To reproduce the issue:

  • We are using a TMS570LS2134CPGEQQ1.
  • Generate a new project using HalCoGen
  • Under the “Safety Init” tab, check the “Enable CCM Self test” box
  • Inside of ccmSelfCheck or selfTestFailNotification, insert some code (such as an non-terminating while loop) that allows you to see that the tests fails (the code from HALCoGen does not do anything so the failure isn’t readily noticeable).
  • We are seeing failures from CCMSELFCHECK_FAIL2 and CCMSELFCHECK_FAIL3, though these could share a common root cause. FAIL2 indicates a problem with the test of error forcing mode.
  • This happens whether we are connected with the debugger or not.

 

We are wondering 1) is there a problem with the code generated by HALCoGen? 2) is this a known issue? 3) if so, is there a solution or workaround?

 

Thank you!

-David

  • The only issue I am aware of is that the CCMSELFCHECK should be run after a power-on reset without the JTAG connected.
  • Bob,

    Thank you very much for your reply. Unfortunately that didn't quite do the trick.

    I took the following approach...

    1) I setup our code to loop if the CCM self-test fails and updated the image.
    2) Disconnected the JTAG.
    3) Powered-off the device.
    4) Powered the device back on, and used a PC-based test application that we developed which communicates with the device over serial; unfortunately our application (on the target) appeared to be unresponsive.
    5) Reconnected the JTAG.
    6) Connected with the Code Composer debugger.
    7) The debugger showed the the current instruction was the loop I inserted, which shows that the test failed, even after a cold power-on and having the JTAG physically disconnected. The code indicates the same failure, CCMSELFCHECK_FAIL2.

    Is there something else that we should do?

    Thanks!
    -David
  • Hi David,

     Bob is out today. I cannot replicate your observation. As you can see I inserted the while(1) for both the fail2 and fail3 checks and I never came here. Once the code is loaded I simply assert power up reset on the board and connect to the target. Each time I will get to the main(); I generated my code from HalCoGen. You can try it one your side. Here is the attached project. 

            if ((esmREG->SR1[0U] & 0x80000000U) == 0x80000000U)
            {
                /* ESM flag is not set */
                selftestFailNotification(CCMSELFCHECK_FAIL2);
                while(1);
            }
            else
            {
                /* Configure CCM in error-forcing mode */
                CCMKEYR = 0x9U;
    
                /* Wait till error-forcing is completed. */
                /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
                while (CCMKEYR != 0U)
                {
                }/* Wait */
    
                /* check if compare error flag is set */
                if ((esmREG->SR1[1U] & 0x4U) != 0x4U)
                {
                    /* ESM flag is not set */
                    selftestFailNotification(CCMSELFCHECK_FAIL3);
                    while(1);
                }
                else

    0246.LS31x_CCM_SelfCheck.zip