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.

STL March Test issue

Other Parts Discussed in Thread: TMS320F28065

Hi Support,

my customer is seeing an issue while executing "STL_CPU_TEST_testCpuRegisters’" function with "high frequency".

In fact, if they execute the function every 2msec, they are receiving a Fault. Differently, if they execute it every 2 seconds, they don't receive any fault.

Is this expected?

Thanks and regards,

Alberto

  • Alberto,

    Please specify the device you are working with?

    Regards,
    Manoj
  • What is the fault they are receiving? What is the error returned?

    sal
  • PN is TMS320F28065.
    Thanks
  • I also noticed the thread name is "STL_MARCH Test issue."

    Is the March13n test failing? Or the CPU Register test failing? or the VCU register test failing?

    sal
  • Hi,

    the function STL_CPU_TEST is called during VCU register test in our library.
    This is used only once in our library, so this is easy to find.
    The issue is present if the function is called every 2 msec.

    Please let me know why this is failing.
    Thanks and regards,
    Alberto
  • I can see nothing from the code of the test that would cause it to fail in and of itself.

    Are interrupts disabled when this test is run in the system?

    sal
  • Sal,

    Yes all the interrupt are disabled during the test execution; the test is called during the execution of the highest priority interrupt of the system code.
    Note that the source code is like our STL library downloaded from Ti website, version C2000MCU_IEC60730_4_00_01_00, the only difference is that test is called inside an ISR together with all other libraries test, but the FLASH test. This is the only one that have return Fault if called every 2ms more or less.
    Following the source code of customer application:


    case TEST_PART_ID:
    …………………………………………….
    TEST OK
    …………………………………………….
    break;
    case TEST_CPU_REGISTERS:
    count_CPU_REG++;
    if(count_CPU_REG>1000)
    {
    count_CPU_REG = 0U;
    status = 0;
    DINT;
    status = STL_CPU_TEST_testCpuRegisters();
    EINT;
    if(status != SIG_CPU_REG_TEST){
    STL_u_FaultType = STL_FAULT_SIG_CPU_REG;
    STL_Error_Detected_Loop();
    }
    }
    break;
    case TEST_FPU_REGISTERS:
    …………………………………………….
    TEST OK
    …………………………………………….
    break;

    They have now inserted a 1000 cycle delay in order to avoid the fault return(status value = SIG_CPU_REG_TEST). CPU REG test now is called every 2 sec more or less.

    Let me know how to solve this.
    Thanks and regards,
    Alberto
  • Alberto,

    I am trying to help you solve this problem. I cannot reproduce this right now. But we can solve this problem together if you and the customer help me to help you debug it. This is a fairly straightforward test in assembly and we should be able to find the issue. Perhaps if the customer interacted on this thread, the responses would be faster.

    I need to know what the contents of the CPU registers are immediately following the return of the STL_CPU_TEST_testCPURegisters() function.

    Opton 1) One way to do this would be to PUSH all the CPU registers onto the stack. This will be strictly for debug purposes until we solve this problem.

    PUSH all the CPU registers onto the stack and when there is a FAIL, please send me the contents of those registers.

    In order to continue to run the system, all of the registers that were PUSHed onto the stack should be either immediately removed or the SP should be decremented by 30.

    You can use the code below to push the contents onto the stack.
    PUSH IER ; (1)
    ASP ; Align stack pointer (SP+1)
    PUSH XT ; (2:3)
    PUSH ACC ; (4:5) Remember: AH = ST1, AL = ST0 from user context
    PUSH P ; (6:7)
    PUSH XAR0 ; (8:9)
    PUSH XAR1 ; (A:B)
    PUSH XAR2 ; (C:D)
    PUSH XAR3 ; (E:F)
    PUSH XAR4 ; (10:11)
    PUSH XAR5 ; (12:13)
    PUSH XAR6 ; (14:15)
    PUSH XAR7 ; (16:17)
    PUSH T:ST0 ; (18:19)
    PUSH DP:ST1 ; (1A:1B)
    PUSH RPC ; (1C:1D)

    Option 2) Another way that may work, would be to hit an ESTOP on a FAIL. We would loss the contents of a couple registers that were used to do the if() condition, but it may be good enough. You and the customer may want to try this method first. If you choose to get the contents of the CPU registers this way, please send me those contents and specify the way you achieved this.

    Regards,
    sal