(FS26+S32K3-T-BOX) FS26 can't enter Normal mode

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

(FS26+S32K3-T-BOX) FS26 can't enter Normal mode

跳至解决方案
1,402 次查看
iverson3ya
Contributor III

I attempted to use the sample program "Sbc_fs26_Example_DS" to put FS26 into normal mode, but it failed. It seems that the first watchdog feed during initialization is already failing. Here is my code and the UART printout. I noticed that whenever it exits debug mode, it causes the entire FS26 to reset, repeatedly cycling through this code.

 

eReturnValue = Sbc_fs26_Init(&sbcConfig_BOARD_InitPeripherals);
 
    Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_STATES_ADDR, &rxData);
    printf("Before SBC_FS26_FS_STATES_ADDR: DevStatus:%x, FS_status:%x\r\n",rxData.u8DeviceStatus,rxData.u16ReadData);
 
    Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_WD_TOKEN_ADDR, &rxData);
    if(eReturnValue != E_OK)
{
bPass = FALSE; /* Error during initialization. */
}
    printf("start token:%x\r\n",rxData.u16ReadData);
    eReturnValue |= Sbc_fs26_InitDevice();
    if(eReturnValue != E_OK)
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("Sbc_fs26_InitDevice:%s\r\n",OKtoSTR(eReturnValue));
 
    eReturnValue = Sbc_fs26_WdChangeToken(new_token);
    if(eReturnValue != E_OK)
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("Sbc_fs26_WdChangeToken:%s\r\n",OKtoSTR(eReturnValue));
 
    T_sbc_fs26_TimeDelay(500U);
 
    /* Check the function Sbc_fs26_ReadRegister() reading the register SBC_FS26_FS_WD_TOKEN_ADDR */
    eReturnValue = Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_WD_TOKEN_ADDR, &rxData);
    if((eReturnValue != E_OK) || (rxData.u16ReadData != new_token))
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("new_token/real_token:%x/%x\r\n",new_token,rxData.u16ReadData);
 
     /* Call function WDG refresh */
    eReturnValue = Sbc_fs26_WdRefresh();
    if(eReturnValue != E_OK)
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("Sbc_fs26_WdRefresh:%s\r\n",OKtoSTR(eReturnValue));
 
    /* Check the SBC error counter */
    eReturnValue = Sbc_fs26_GetFaultErrorCounterValue(&errorCounter);
    if((eReturnValue != E_OK) || (errorCounter != 0U))
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("fs26_GetFaultErrorCounterValue:%x\r\n",errorCounter);
 
    /* Exit DEBUG mode. */
    eReturnValue = Sbc_fs26_WriteRegister(TRUE, SBC_FS26_FS_STATES_ADDR, 0X4000, NULL_PTR);
    if(eReturnValue != E_OK)
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("Exit DEBUG mode:%s\r\n",OKtoSTR(eReturnValue));
 
    /* Call the function fs26_FsxbRelease() with SBC_FS26_FS_BOTH to set both FS0B and FS1B */
    eReturnValue = Sbc_fs26_FsxbRelease(SBC_FS26_FS_BOTH);
    if(eReturnValue != E_OK)
    {
        bPass = FALSE; /* Error during initialization. */
    }
    printf("fs26_FsxbRelease:%s\r\n",OKtoSTR(eReturnValue));
 
/* Read data in SBC FS26 in the memory 0XB =  normal mode */
eReturnValue = Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_STATES_ADDR, &rxData);
if((eReturnValue != E_OK) || ((rxData.u16ReadData & 0xFF) != SBC_FS26_NORMAL_MODE))
{
bPass = FALSE; /* Error during initialization. */
}
printf("read SBC_FS26_FS_STATES_ADDR:%s\r\n",OKtoSTR(eReturnValue));
    printf("After SBC_FS26_FS_STATES_ADDR: DevStatus:%x, FS_status:%x\r\n",rxData.u8DeviceStatus,rxData.u16ReadData);
iverson3ya_0-1686123001075.png

#S32K3-T-BOX #FS26

0 项奖励
回复
1 解答
1,365 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you. Thank you for using the NXP communities.

Please review the response from one of our specialist below:

WD need right Content regardless of WD refresh time if SBC is in debug mode.

so please check if the WD refresh content is right or not. 

Below is an process for SPI commands to let FS26 enter normal mode. For your reference. 

diazmarin09_0-1686334830764.png

 

I hope this information helps.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,366 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you. Thank you for using the NXP communities.

Please review the response from one of our specialist below:

WD need right Content regardless of WD refresh time if SBC is in debug mode.

so please check if the WD refresh content is right or not. 

Below is an process for SPI commands to let FS26 enter normal mode. For your reference. 

diazmarin09_0-1686334830764.png

 

I hope this information helps.

Regards,

David

0 项奖励
回复
635 次查看
Akhil1
Contributor I

Hello @diazmarin09 , Can you please help me with SBC FS26 LDT wakeup in s32k3 controller and provide any example file regarding this.

Thanks and Regards

Akhil

0 项奖励
回复
1,265 次查看
iverson3ya
Contributor III

I followed your instructions to set up FS26, but I still couldn't successfully feed the dog. I have tried feeding it with the default value 5AB2 and also attempted to change the token to AAAA for feeding, but none of these attempts were successful. Below is the information I printed. I also tried adding "exit Debug mode" directly afterwards, but every time I add it, FS26 resets. I even attempted to disable the watchdog, but it didn't make any difference.

iverson3ya_0-1686617968630.png

How can I resolve the following issues?

  1. Watchdog problem (I have already read the data before feeding, so there should be no errors).
  2. Transitioning from Debug mode to normal mode.

thanks a lot

0 项奖励
回复
1,181 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Please accept my apologies for the delayed response. 

The SW sequence is first WD refresh and then exist Debug mode, from your description, there is no Reset during first WD refresh, but Reset happaen when sending Exist Debug mode commands,Right ?

If so, that means first WD refresh is OK and the reset is happen due to leaving debug mode. Please check whether customer has configured WD window to be 0  with beloew 2 commands. other wise, customer need feed the WD with configured window time Periodly in non-debug mode.

diazmarin09_0-1687877837371.png

 

Regards,

David 

0 项奖励
回复