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.

TMS570

Other Parts Discussed in Thread: TMS570LS3137

PBIST self test is taking longer time to execute.

Once it complete it is giving PBIST is passed but my software is going in to endless loop.

Initially I exacted PBIST for 5 RAM group but it is leading to DET or endless loop. 

When I comment out 3 RAM group and run it for 2 my software start working.

Do you know any reason for this behavior of software.

When I comment out PBIST itself my software is working properly.

Please find code implementation with TI SafetyLib Library function for PBIST self test below.

boolean SelfTest_PBIST(void)
{
    boolean retVal;

    if(SELFTEST_EN == UCPrphSlfTst_bEnDs_p)
    {
    	retVal = SL_SelfTest_PBIST( PBIST_EXECUTE,(/*PBIST_RAMGROUP_13_N2HET1 | PBIST_RAMGROUP_14_HETTU1 | PBIST_RAMGROUP_10_VIM |*/
    	            PBIST_RAMGROUP_19_N2HET2 | PBIST_RAMGROUP_20_HETTU2),PBISTALGO_MARCH13N_RED_2PORT);


		while (FALSE == SL_SelfTest_Status_PBIST(&pbistStatus))
		{
			PBIST_Inc++;

			PBIST_ST_State = ST_InProgress;

			if(PBIST_Inc > PBIST_TIMEOUT)
			{
				PBIST_ST_State = ST_Timeout;

				break;
			}
		}

		if(TRUE == retVal)
		{
			retVal = SL_SelfTest_PBIST_StopExec();
		}

		if((TRUE == retVal) && (ST_PASS == (pbistStatus.stResult)))
		{
			/*Do nothing*/
		}
		else if(ST_FAIL == (pbistStatus.stResult))
		{
			SlfTest_Result.SL_PBIST = SELFTEST_FAIL;
			//Safe state 5 need to update if failure of selftest
			IL_BMS_SET_SAFESTAE5(SlfTest_Result.SL_PBIST);

		}
		else
		{
			/*Do Nothing*/
		}

		if(PBIST_ST_State == ST_Timeout)
		{
			/*Do Nothing*/
		}
		else
		{
			PBIST_ST_State = ST_Complete;
		}

	return retVal;
    }
    else
    {
    	/*Do Nothing*/
    }
}

  • Hi Nikhil,

    Which device do you use?

  • Hi QJ Wang,

    Thanks for your reply,

    I am using TMS570LS3137 device.

    Also adding to this I have some queries related to ADC self test and ADC calibration API in safetyLib Library.

    SL_SelfTest_ADC and SL_adcCalibration API having Endless loop. This API itself now following ISO26262 standard.

    Do you have any suggestion how to used this API for ADC self test.

    Because ideally I should not make any changes to TI safety Library files as it is already tested and certified. 

    So I can not add timeout to this self test.

    /* Wait for calibration conversion to complete */
    /*SAFETYMCUSW 28 D <APPROVED> Comment_13*/
    /*SAFETYMCUSW 134 S MR: 12.2 <APPROVED> Comment_5*/
    while((adc->CALCR & 0x00010000U)==0x00010000U)
    {
    } /* Wait */

    above lies for ADC calibration.

    /* Wait for calibration conversion to complete */
    /*SAFETYMCUSW 134 S MR: 12.2 <APPROVED> Comment_5*/
    while ((sl_adcREG->CALCR & ADC_START_CALIBRATION) == ADC_START_CALIBRATION) {

    for ADC self test in TI safetyLib Library.

  • This API itself not following ISO26262 standard

  • Because ideally I should not make any changes to TI safety Library files as it is already tested and certified. 

    We don't offer certified software packages or libraries. Rather we have certified the development process that is used to create these software libraries and packages. We provide compliance support packages (CSPs) which allow you to generate the required coverage and test reports to provide as evidence to your system assessors.

    Do you have any suggestion how to used this API for ADC self test.

    The SL_SelfTest_ADC API calls the SL_AdcCalibration API, so there is no need to call both in your code.

    When the ADC input channel selftest mode is enabled, a reference voltage (VREFHI or VREFLO) is superimposed on the input signal. Depending on the reference voltage selected, a partial charge/discharge of the external input capacitance Cext will occur through internal calibration resistors Rcal (7K || 5K).

    If the bond-wire is intact, you'd expect a small change from normal input conversion results. The change between conversion results Vn, Vu and Vd depends on how long the input channel is sampled. Also, the change in conversion result depends on the large Rcal * Cext time constant.

    If the bond-wire is broken, you'd expect a large change between Vn, Vu and Vd. This change again depends on how long the input is sampled, and is now dependent on the very small Rcal * Cmux time constant.

  • it is a common practice to add external components to the ADINx pins that scale and filter the signal from the analog source. Below is a typical circuit for ADC input:

    Cext[x] is used to lower the source impedance of the channel as seen by the ADC so that the internal sample capacitor can be charged quickly. 

  • Initially I exacted PBIST for 5 RAM group but it is leading to DET or endless loop. 

    When I comment out 3 RAM group and run it for 2 my software start working.

    Do you know any reason for this behavior of software.

    Your code looks good to me. The memory groups in your function call are all dual port, and the correct algorithm for dual port memory is used. Did you check the MSTDONE bit in 

    MSTCGSTAT register?

  • Hi QJ Wang

    Thanks for your reply.

    It seems problem with PBIST_RAMGROUP_10_VIM. Whenever I am doing self test for PBIST_RAMGROUP_10_VIM, PBIST is getting passed but OS went to endless loop.

    OS calling below functions 

    Os_ErrKernelPanic();
    Os_Hal_CoreFreeze();

    which caused DET.

  • Do you perform the PBIST at boot time before main() is called or before the RTOS scheduler starts? After running PBIST on VIM RAM, the VIM vector table is cleaned , you need to call vimInit() after VIM RAM PBIST.