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.

TMS570LC43x SAFETI Diagnostic



Hi,

I am trying to run SAFETI library using demo code 2.4.0 in TMS570LC43x HERCULES DEVELOPMENT KIT.

First time the retrun of  "SL_Init_ResetReason()" function is RESET_TYPE_DEBUG. which is seems OK.

when code jump to  SL_Init_Memory(RAMTYPE_RAM); function for checking CPU RAM it is also done which is showing is MINIDONE 8th bit is high, which also seems OK

But after execution of this SL_Init_Memory(RAMTYPE_RAM); function the value of resetReason is changed from RESET_TYPE_DEBUG to RESET_TYPE_UNKNOWN.

 

Can you please let me know why the status of resetReason is changed.

  • Hi All,

    I have investigate more on it and i have seen that the initial value sl_systemREG1->SYSESR; register is 0x00000800 and resetReason is RESET_TYPE_DEBUG.

    when we are entering SL_Init_Memory(RAMTYPE_RAM); function after execution of sl_systemREG1->MSINENA  = ramSet; instruction than the value of  sl_systemREG1->SYSESR; register is changed "0x00000000" due this the resetReason is also change from "RESET_TYPE_DEBUG" to "RESET_TYPE_UNKNOWN".

    Why the value of sl_systemREG1->SYSESR changing after execution of  sl_systemREG1->MSINENA  = ramSet instruction?

     

  • Hi Pankaj,

    We started working on your issue and we will provide an update soon.

    --

    Thanks & regards,
    Jagadish.

  • Hi Pankaj,

    The reset reason in the corresponding ESR register will be cleared immediately after copying the reason into the "retVal" of the function "SL_Init_ResetReason"

    So, you can see the above screenshot. In above screenshot the SYSESR register is writing to clear the reason. This is because the next reset can be at anytime right so they will clear the ESR register after immediately copying the reason. So, we should not consider the SYSESR register value once it passes the function "SL_Init_ResetReason".

    If you want to pass the reset reason to the application, i suggested one method in the below thread. Please refer it

    (+) RM46L852: Generated code in sys_startup.c prevents us to know system reset. - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    --

    Thanks & regards,
    Jagadish.

  • Hi ,

    Thanks for the reply Jagadish.
    I really appreciate your effort.

    I have an queries that:-

    Q1.

    inside the  void afterSTC(void) function. If i am getting any of one "RAMTYPE_MIBSPI2_RAM" failure. 

    /* Initialise MIBSPI SRAM */
    SL_Init_Memory(RAMTYPE_MIBSPI1_RAM);
    SL_Init_Memory(RAMTYPE_MIBSPI2_RAM);
    SL_Init_Memory(RAMTYPE_MIBSPI3_RAM);
    SL_Init_Memory(RAMTYPE_MIBSPI4_RAM);
    SL_Init_Memory(RAMTYPE_MIBSPI5_RAM);

    and If the status bit of  MSTDONE is not set than how we will solve this problem?.

    We want to re run this test case again. what we have to do?

    If you having any document regarding error solving of particular test failure please let us know. it will be very helpful for us.

    Q2.  In main after 10 cycle of 

    if(maintaskcount>10)

    {

    #ifdef __TI_COMPILER_VERSION__
    __asm(" b #-8 ");                                                     <-- code is hang in this inline instruction "what and why this line is using?".
    #endif
    #ifdef __IAR_SYSTEMS_ICC__
    asm(" B .");
    #endif

    #if FUNCTION_PROFILING_ENABLED
    fptests = fopen("Profile_tests.txt","w+");               <-- where we can get this file .

    }

    Thanks and regard

    Pankaj Verma

  • Hi ,

    Q2 --> solved

    Q1 still pending.

    Can you also tell me that, where  we can find the instruction or function defination of  __TI_auto_init();?  

    Thanks and regard

    Pankaj Verma

  • Hi Pankaj,

    Can you also tell me that, where  we can find the instruction or function defination of  __TI_auto_init();?  

    TI_auto_init() is used to perform C autoinitialization of global/static variables, and process the binit copy table.

    It is a compiler function so its definition can be found in the below path of the compiler:

    And here is the definition:

    And even you can set a breakpoint at the calling of the function and open the code in de-assembly and do step by step debugging in de-assembly code then you can see the execution in this function.

    --

    Thanks & regards,
    Jagadish.

  • Hi ,

    Thanks for the reply Jagadish.
    I really appreciate your effort. 

    Slight smileThumbsup

    I am facing some other issues also.

    Can you please tell me that in safeTI diagnostic library all the function is working in Supervisor mode i.e "0x13". even in main loop also.

    If i want to change mode from supervisor  mode to system mode "0x1F" in main function. How we can change mode?

     

    Is possible to run all the safeTI lib function in main loop in system mode?

  • Hi Pankaj,

    I guess you reopened a new thread for above questions:

    (+) HERCULES_SAFETY_MCU_DEMOS: TMS570LC43x SAFETI Diagnostic - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    So, i am closing this thread and will do support on above thread.

    --

    Thanks & regards,
    Jagadish.