Trigger BIST Failure on S32K344 using S32DS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Trigger BIST Failure on S32K344 using S32DS

1,219 次查看
aayushisingh
NXP Employee
NXP Employee

I'm working with the S32K344 in S32DS and trying to test the BIST functionality. I want to simulate a failure to observe how the system reacts, but I’m not sure how to get BIST to actually fail.

So far, I’ve tried changing the LBIST clock frequency in the clock configuration, but I still get  Bist_GetExecStatus as BIST_OK. 

Is there a recommended way to force a BIST failure for testing purposes? 

I am using the example code from the demo for my testing:

破坏者
if (MCU_POWER_ON_RESET == resetReason) {
		Bist_Run(BIST_SAFETYBOOT_CFG);
	} else if (MCU_ST_DONE_RESET == resetReason) {
		bistStatus = Bist_GetExecStatus(BIST_SAFETYBOOT_CFG);
		if (bistStatus != BIST_OK) {
                   ...

 

0 项奖励
回复
3 回复数

1,196 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @aayushisingh,

We cannot inject a fault into MBIST itself to make it report a failure.
MBIST is a hardware self-test mechanism built into the silicon. It runs a deterministic test pattern to detect structural faults.

It was already discussed in this thread:
https://community.nxp.com/t5/S32K/STCU2-BIST-question/m-p/1774475

 

The watchdog can be set incorrectly though:

danielmartynek_0-1750747208186.png

 

Regards,

Daniel

 

0 项奖励
回复

1,169 次查看
aayushisingh
NXP Employee
NXP Employee

Thanks for the clarification @danielmartynek !

Just to confirm, if I intentionally misconfigure the watchdog, and it triggers during BIST execution, does that mean BIST is considered incomplete, or the system just resets before BIST can finish?

Also, is the watchdog timer mentioned in the manual referring to BIST_STCU_SAF_WDG_VAL? If that expires, would the reset reason be something other than MCU_ST_DONE_RESET?

As I mentioned earlier, I’m using the demo example provided with the SAF module. In that context, would you recommend modifying the reset check from just MCU_ST_DONE_RESET to account for other reset types?

破坏者
    if (MCU_POWER_ON_RESET == resetReason)
    {
#if (BIST_MODULE_ENABLED == 1U)
        Bist_Run(BIST_SAFETYBOOT_CFG);
    }
    else if(MCU_ST_DONE_RESET == resetReason)
    {
        bistStatus = Bist_GetExecStatus(BIST_SAFETYBOOT_CFG);
        if( bistStatus != BIST_OK )
        {
            if(bistStatus == BIST_ERROR)
            { ...
 

 

0 项奖励
回复

1,115 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @aayushisingh,

If BIST WDG expires you should be able to read that as internal error ERR_STTA register, bit WDTOSW.

if(bistStatus == BIST_ERROR)
            {
                /* Reads STCU ERR_STAT register to identify what HW error occurred */
                stcuStatus = Bist_GetRawErrorStatus();
                (void) stcuStatus;
            }

For test purpose you can modify macro BIST_STCU_DIAG_WDG_VAL to some very low value to see the effect.

 

Regards,

Daniel

0 项奖励
回复