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: LBIST test randomly fails on some HWs

Part Number: TMS570LC4357

Hello,

we have several HW designs with TMS570LC4357 and with only a single HW type we are seeing random LBIST failures (i.e. only few units of the same type fail, majority of the units work properly). The test fails with the following:

STCGSTAT=503h

STCFSTAT=3h

STCCICR=20002h

STCCADDR1=1EFh

STCCADDR2=1EFh

The self-test code looks as follows:

void stc1_launch(void)
{
  // Maximum STC clock is 110 MHz
  // Divide GCLK1 300 MHz by 3 to achieve this clock rate for both segments SEG0 and SEG1
  stcREG1->STCCLKDIV = STCCLKDIV_DIVSEG0_3 | STCCLKDIV_DIVSEG1_3;

  // Clear CPU RST status bit in the System Exception Status Register in the system module.
  // Note: Write 1 will clear this bit. Write 0 has no effect.
  systemREG1->SYSESR = Q_SYS_CPURST;

  // Configure the test interval count in STC module. Note that in case of multiple segments, segments run
  // sequentially, one after another depending on the number of intervals selected.
  stcREG1->STCGCR0 = (stcREG1->STCGCR0 & 0x0000FFFCu) | (U32)(STC_INTERVALS << 16u) | (U32)STCGCR0_RESTART;

  // Configure self-test run time out counter preload register
  stcREG1->STCTPR = 0xFFFFFFFFu;

  // Configure the STC to run both redundant CPU cores in parallel
  // The both CPU cores is default, but to be sure...
  do
  {
    stcREG1->STCGCR1 = 0x5u;
  } while((stcREG1->STCGCR1 & 0x00000F00u) != 0u);

  // Enable self-test controller
  stcREG1->STCGCR1 = 0xAu;

  // Put the CPU in idle mode to launch the self-test procedure
  // STC generates a CPU reset after completion of each test regardless of pass or fail
  for(;;)
  { __asm__ ("WFI"); }

  __builtin_unreachable();
}

and the evaluation code:

void stc1_checkResult(void)
{
  if((stcREG1->STCGSTAT & 0x2u) != 0u)
  {
    // Something is wrong with CPU logic => Generate system reset
    rtos_kprintf(RTOS_LOGLEVEL_FW_ERROR, "CPU/uSCU LBIST failed %Xh %Xh %Xh %Xh %Xh", stcREG1->STCGSTAT,
                                                                              stcREG1->STCFSTAT,
                                                                              stcREG1->STCCICR,
                                                                              stcREG1->STCCADDR,
                                                                              stcREG1->STCCADDR1);
    appReset(RST_TYPE_HOOK);
  }
  else
  {
    stcREG1->STCGSTAT = 0x1u; // Write 1 to clear TEST_DONE flag
  }
}

When STCCLK is set to 100 MHz, the test keeps failing, when we lower the frequency to 75 MHz, the problem is gone, and the test always passes.

Could you please recommend steps to find the root of the problem? Should we focus on a supply voltage? Is there some more detailed documentation (application note)?

Thanks in advance

  Jan Nárovec

  • Hello Jan.

    The maximum clock rate for the STC self-test is 110MHz, so 100MHz used in your test should be fine. Please add 16 clock cycles delay before enabling the selftest:

    stcREG->STCGCR1 = 0x0AU;

    and before putting the CPU in idle mode:

    asm(" WFI");

    asm(" NOP");

    asm(" NOP");

    asm(" NOP");

    asm(" NOP");

     

     

  • Thank you for the answer. We'll try to implement your recommendations tomorrow. But – it looks like a bit of a black magic to me...this should actually solve the problem or help find its root? I don't see anything like this in the Technical Reference Manual...

  • Hello Jan,

    The delay is not required by the TRM. Adding a delay is my suggestion for you to try. I am not sure if it can solve your problem.

  • Hello,

    so I've added 16 nops

    1. before enabling the self-test controller
    2. before the WFI instruction (and after this instruction too, although it makes no sense in my humble opinion)

    Result: nothing changed, the test still keeps failing. The only workaround is to lower the STC clock frequency.

    Best regards,

      Jan

  • Hello,

    so for others: the problem has been caused by a suboptimal placing and capacity of decoupling capacitors at 1.2V power supply rail.

    Regards,

      Jan

  • Thanks Jan keeping us informed. Can you tell me the value of the decoupling capacitors which cause the LBIST failure? Normally a 0.1uF cap is used for each power pin and placed close to the power pin.  

    LBIST usually draws a large current and can cause a current spike. This spike could cause the 1.2V supply to drop below the recommended value if there is not enough capacitance on the VCC supply to feed the current spike.

  • There are five 1 nF capacitors right under the chip and one 1 µF is placed roughly 6 cm from the chip (just for VCC, VCCPLL has its own decoupling capacitors). The distance – together with capacitors' tolerances – caused described problems. Increasing the value to 4.7 µF is a sufficiently robust solution.

    As a SW workaround, we decreased the STC frequency from 100 MHz to 75 MHz – such modification ensures, that the board is able to pass the self-test even at −40 °C (also −40 °F).

  • Thanks Jan. Have a nice weekend!