fs23 Lin mode swith question

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

fs23 Lin mode swith question

ソリューションへジャンプ
1,476件の閲覧回数
gumu
Contributor V

Hello,

We encountered a question while debugging the FS LIN functionality. Specifically, we found that in debug mode, we cannot set the LINTRCV_FS23_TRCVMODE_OFF mode using the LinTrcv_fs23_SetMode() function.

The code snippet is as follows:

 

Std_ReturnType LinTrcv_fs23_SetMode(uint8 u8LinNetwork, LinTrcv_fs23_TrcvModeType eOpMode)
{
    uint16 u16RegData = 0U;
    Std_ReturnType eStatus;
    LinTrcv_fs23_TrcvModeType eNewHwOpMode = LINTRCV_FS23_TRCVMODE_INVALID;
    /* Read M_LIN register. */
    eStatus = Sbc_fs23_ReadRegister(SBC_FS23_M_LIN_ADDR, &u16RegData);

    if ((Std_ReturnType)E_OK == eStatus)
    {
        /* Set new register value. */
        u16RegData &= ~(SBC_FS23_M_LIN_MODE_MASK | SBC_FS23_M_LIN_SLOPE_MASK| SBC_FS23_M_LIN_FS_DIS_MASK);
        if(TRUE == xG_drivers[u8LinNetwork].bLinSlowSlope)
        {
            u16RegData |= SBC_FS23_M_LIN_SLOPE_SLOW;
        }
        if(FALSE == xG_drivers[u8LinNetwork].bLinFailsafeDisable)
        {
            u16RegData |= SBC_FS23_M_LIN_FS_DIS_KEEP;
        }
        u16RegData |= ((uint16)eOpMode << SBC_FS23_M_LIN_MODE_SHIFT);

        eStatus = Sbc_fs23_WriteRegister(SBC_FS23_M_LIN_ADDR, u16RegData);
....
        /*Check the real hardware state*/
        eStatus |= LinTrcv_fs23_GetMode(u8LinNetwork, &eNewHwOpMode);
        if((eNewHwOpMode == eOpMode) && ((Std_ReturnType)E_OK == eStatus))
        {
            eStatus = (Std_ReturnType)E_OK;
        }
        else
        {
            eStatus = (Std_ReturnType)E_NOT_OK;
        }
    }

    return eStatus;
}

 

The eOpMode is LINTRCV_FS23_TRCVMODE_OFF,  the eNewHwOpMode  is LINTRCV_FS23_TRCVMODE_NORMAL.

The manual states that in debug mode, LIN defaults to active mode. Is this behavior normal?

Thanks!

0 件の賞賛
返信
1 解決策
1,445件の閲覧回数
quangvuanh
NXP Employee
NXP Employee

Hi @gumu , I got confirmation from hardware team that it's a normal behaviour. In debug mode, the transceiver mode is forced ACTIVE. So even if you try and change the LIN_MODE field to OFFLINE (OFF, 2b00) then the transceiver stays in active mode.

元の投稿で解決策を見る

3 返答(返信)
1,447件の閲覧回数
quangvuanh
NXP Employee
NXP Employee
Hi, I have to check with hardware team. Can you please let me know what version of FS23 that you have? Or what is the part number?
0 件の賞賛
返信
1,446件の閲覧回数
quangvuanh
NXP Employee
NXP Employee

Hi @gumu , I got confirmation from hardware team that it's a normal behaviour. In debug mode, the transceiver mode is forced ACTIVE. So even if you try and change the LIN_MODE field to OFFLINE (OFF, 2b00) then the transceiver stays in active mode.

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

Hi Quang (@quangvuanh),

Could you please help with this question from Anhui Zhitu Technology China?

Thanks & BRs, Tomas

0 件の賞賛
返信