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.

Ccmselftest not out of loop

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

I'm using microcontroller is TMS570LS3137.

I use HalCoGen generate code "void ccmSelfCheck(void)" in sys_selftest.c.

    /* Configure CCM in self-test mode */
    CCMKEYR = 0x6U;
    /* Wait for CCM self-test to complete */
    /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
    while ((CCMSR & 0x100U) != 0x100U)
    {
    }/* Wait */

Above the code not out of the loop "while ((CCMSR & 0x100U) != 0x100U)" even wait about 5 minutes.

Do you know why? I want to know how to out of loop.

  • Hi Arriy,
    I think the CCM selftest needs to be run when the debugger is not connected. Please try to do a 'free run' without the debugger connected. Please see below from TRM.

    9.3.5 Operation During CPU Debug Mode
    Certain debug operations place the CPU in a halting debug state where the code execution is halted.
    Because halting debug events are asynchronous, there is a possibility for the debug requests to cause
    loss of lockstep. CCM-R4F will disable upon detection of halting debug requests. Core compare error will
    not be generated and flags will not update. A CPU reset is needed to ensure the CPUs are again in
    lockstep and will also re-enable the CCM-R4F.
  • Hi,Charles.
    Thank you your answer.
    Out of loop by remove the debugger.

    Add question , I want to know ESM flag Group1 Channel31 and Group2 Channel2 are mean.

    I want to do fault injection test to ESM flag Group2 Channel2.
    It can be implemented in any way ?
  • Hi Arriy,
    GP1.31 is set if the selftest fails. GP2.2 is set if the CCM fails (the two CPUs are mismatched) in functional mode.

    Are you using HalCoGen?

    HalCoGen has API to perform CCM selftest. You should take a look at them.

    Look at the ccmSeflCheck() API in the sys_selftest.c file.
  • Hi Arriy,
    Is your question answered? if your question is answered can you please click the 'Verify Answer' to close the thread? Thanks.