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.

TPS65381A-Q1: Q&A Watchdog synchronization with RM42L432

Part Number: TPS65381A-Q1

Hello, 

I've implemented Q&A watchdog between TPS65381A-Q and RM42Lx Launchpad, I'm running WD diagnostics as describe in the Hitex example and it all works as excepted.

When I'm setting the RM to initialize the WD without the diagnostic part it runs perfect, when I run the same code after the diagnostic state and sending the TPS with TPS_ExitDiagnosticMode(); I lose syncronization and the watchdog fail count is always 0x07, the TPS state is Safe (0x04), and the watchdog status register is 0xC0.

Please help

Yuval

  • I want to contact Mr. Michael Wendt for technical email or oral question related to this circuit connecting with HFO TF536 16bit da converter, because of high text volume. Thank you!

  • Hi Yuval,

    Have you been able to confirm that the RM43L432 keeps sending the answers to arrive in the expected window1 and window2 configuration after exiting the DiagnosticMode? If you have access to the SPI pins the best option would be to probe the lines to make sure the Q&A sequence timing is preserve.

    Regards,
    Ivan

  • Hi Ivan,

    
    

    I don't have the right tool to capture the SPI, but I did toggle a GPIO on rti even see pic attached:

     

    WD init is:

    #define OPEN_WINDOW_CONFIG 40
    #define CLOSE_WINDOW_CONFIG 15
    boolean ML_tps_watchdogInit(void)
    {
    	boolean blRetVal = TRUE;
    
    	watchdogconfig.u8TokenFDBK = 0;
    	watchdogconfig.u8TokenSeed = 0;
    	watchdogconfig.blwatchdog_reset = FALSE;
    	watchdogconfig.u8open_windowtime_scaler = (uint8) (OPEN_WINDOW_CONFIG / 0.55 - 1);
    	watchdogconfig.u8close_windowtime_scaler = (uint8) (CLOSE_WINDOW_CONFIG / 0.55 - 1);
    	watchdogconfig.watchdog_mode = QANDA_MODE;
    
    	blRetVal = TPS_WatchdogInit(&watchdogconfig);
    
    	if (TRUE == blRetVal)
    	{
    		TPS_SendDebugText(INFO, (uint8*) "WD_INIT PASS", 0);
    	}
    	else
    	{
    		TPS_SendDebugText(INFO, (uint8*) "WD_INIT FAIL", 0);
    	}
    
    	rtiStopCounter(rtiCOUNTER_BLOCK1);
            rtiResetCounter(rtiCOUNTER_BLOCK1);
    
            ML_tps_setRtiEvenModeToActive();
    	NextActiveWDWindow = OPENWDW;
    
    	rtiREG1->CMP[rtiCOMPARE2].COMPx = (OPEN_WINDOW_CONFIG*10000)/2;
    	rtiSetPeriod(rtiCOMPARE2 ,((OPEN_WINDOW_CONFIG*10000)+(CLOSE_WINDOW_CONFIG*10000))/2);
    
           rtiStartCounter(rtiCOUNTER_BLOCK1);
    
    	return blRetVal;
    }

    When I'm running the code with out the diagnostic stage everything is fine see printout of registers below:

    Initialization of the TPS driver
    Setting DEBUG mode PASS
    Setting ENDRV output PASS
    WD_INIT PASS
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=7
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5
    u8safety_check_ctrl=0x25, blENDRVError=0
    u8CurrentWDFailCount=0, u8wdtstatus=0x0, u8CurrentTPSState=5

    problem starts when i run wd diagnostics-->initializing WD-->exit TPS diagnostic mode: On the scope I see the exact same image as above, but the registers shows:

    Initialization of the TPS driver
    Setting DEBUG mode PASS
    Setting ENDRV output PASS
    TPS_RegReadBackandCompare PASS
    TEST_WD_DIAGMODE PASS
    TOKENEARLY error test PASS
    SEQERR error test PASS
    TOKENERR error test PASS
    TOKENERR error test PASS
    TIMEOUT error test PASS
    TESTING of WD errors passed, ENDRV state changing based on WD errors
    WD_INIT PASS
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=7
    u8safety_check_ctrl=0x27, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=7
    u8safety_check_ctrl=0x14, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=4
    u8safety_check_ctrl=0x15, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=4
    u8safety_check_ctrl=0x15, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=4
    u8safety_check_ctrl=0x15, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=4
    u8safety_check_ctrl=0x15, blENDRVError=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc0, u8CurrentTPSState=4
    u8safety_check_ctrl=0x15, blENDRVError=0

     

  • Hi Ivan,

    I noticed that the TPS WD_WIN1_CFG Register and WD_WIN2_CFG Register are getting corrupted: after diagnostics:

    WD_INIT PASS
    u8CurrentWDFailCount=5, u8wdtstatus=0xc0, u8CurrentTPSState=7
    TPS_WDT_WIN1_CFG=71, TPS_WDT_WIN2_CFG=26
    u8CurrentWDFailCount=0, u8wdtstatus=0xc0, u8CurrentTPSState=0
    TPS_WDT_WIN1_CFG=0, TPS_WDT_WIN2_CFG=0
    u8CurrentWDFailCount=7, u8wdtstatus=0xc8, u8CurrentTPSState=4
    TPS_WDT_WIN1_CFG=127, TPS_WDT_WIN2_CFG=24
    u8CurrentWDFailCount=7, u8wdtstatus=0xc8, u8CurrentTPSState=4
    TPS_WDT_WIN1_CFG=127, TPS_WDT_WIN2_CFG=24

  • Found the problem, I was calling TPS_ConfigureWatchdogReset() by mistake, all working now.