Weird logic on FS26 - S32K344 example

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Weird logic on FS26 - S32K344 example

1,658件の閲覧回数
MVR
Contributor V

Hello all,

I'm confused with an example about FS26 and S32K344.

 

I'm checking Sbc_fs26_TS_T40D34M40I0R0, and in a moment there is this check:

 

    /* Read data in SBC_FS26_FS_STATES register - after being initialized, Sbc device should be in FS_STATES_FS0B_ASSERT */
    eReturnValue |= Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_STATES_ADDR, &rxData);
    if((eReturnValue != E_OK) || ((rxData.u16ReadData & SBC_FS26_FS_FS_STATES_MASK) != SBC_FS26_FS_FS_STATES_FS0B_ASSERT))
    {
        bPass = FALSE; /* Error during initialization. */
    }
 
Looking the comment, it is checking if FS26 is in normal mode, but in the IF condition we can see that it is testing with SBC_FS26_FS_FS_STATES_FS0B_ASSERT macro. Since it is checking if it is in normal mode, shouldn't it be
SBC_FS26_FS_FS_STATES_NORMAL_FS?
 
For example:

    /* Read data in SBC_FS26_FS_STATES register - after being initialized, Sbc device should be in FS_STATES_FS0B_ASSERT */
    eReturnValue |= Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_STATES_ADDR, &rxData);
    if((eReturnValue != E_OK) || ((rxData.u16ReadData & SBC_FS26_FS_FS_STATES_MASK) != SBC_FS26_FS_FS_STATES_NORMAL_FS))
    {
        bPass = FALSE; /* Error during initialization. */
    }
 
Thank you.
タグ(2)
0 件の賞賛
返信
5 返答(返信)

1,619件の閲覧回数
MVR
Contributor V

The example that I'm saying is:
Sbc_fs26_example_HLD_S32K344:

    /* Read data in SBC_FS26_FS_STATES register - after being initialized, Sbc device should be in NORMAL MODE */
    eReturnValue |= Sbc_fs26_ReadRegister(TRUE, SBC_FS26_FS_STATES_ADDR, &rxData);
    if((eReturnValue != E_OK) || ((rxData.u16ReadData & SBC_FS26_FS_FS_STATES_MASK) != SBC_FS26_FS_FS_STATES_FS0B_ASSERT))
    {
        bPass = FALSE; /* Error during initialization. */
    }

0 件の賞賛
返信

1,576件の閲覧回数
quangvuanh
NXP Employee
NXP Employee

Hi,

Are you currently using this version S32K3xx_SBC_FS26_R21-11_4.0.0_D2409? I confirm that the check against SBC_FS26_FS_FS_STATES_FS0B_ASSERT is correct with the current example flow. Because we donot enable the option to release fail-safe pins after initialization FS26_example.PNG

 
0 件の賞賛
返信

1,571件の閲覧回数
MVR
Contributor V

Hello @quangvuanh 

Yes, I'm currently using this version.

But if you take a look the examples into the project, there is this comment in the main.c:

/* Read data in SBC_FS26_FS_STATES register - after being initialized, Sbc device should be in NORMAL MODE */

But it is checking with SBC_FS26_FS_FS_STATES_FS0B_ASSERT and not SBC_FS26_FS_FS_STATES_NORMAL_FS:

 

Capture.PNG

Two questions:

1- What this option "Release Safety Output" means for normal mode? I didn't understand why you commented this option.

2- Do you have any document with instructions about how to configure the SBC using Tresos?

Thanks,

MVR

タグ(2)
0 件の賞賛
返信

1,494件の閲覧回数
quangvuanh
NXP Employee
NXP Employee

Hi,

I would like to clarify code comments in the example. The package you are using is 4.0.0_P01 and yes, the comment was wrong, and it was fixed in our latest released package 4.0.0ex_compare.PNG

About your questions:

1. The device is in Normal operation with all regulators being enabled, but the difference between FS_STATES_FS0B_ASSERT and FS_STATES_NORMAL_FS is on the logic level of FS0b pin. Note that these present the FS State Machine but not the operating mode of the device (operating modes are: Normal, Standby and LPOFF)

FSPin.PNG

the option I showed above allows you to release this safety pin during execution of Sbc_fs26_InitDevice() function. In the example, it was set to NONE, then the expected FS State machine is FS_STATES_FS0B_ASSERT.

2. The best reference is in the driver user manual, you have it inside the package. Please refer chapter 4. Tresos Confguration Plug-in for more detail.

Dont hesitate to ask me more if you are not clear with my explanation

BR,

QuangVA

0 件の賞賛
返信

1,639件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Quang (@quangvuanh),

Could you please help with this question?

Thanks & BRs, Tomas 

0 件の賞賛
返信