LIN STACK S32K118 TX/RX

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

LIN STACK S32K118 TX/RX

1,957件の閲覧回数
riglesias2021
Contributor III

Hi, I am using the LIN stack contained in the S32 SDK for s32k118 and i need to know how the LIN driver works internally. I´m trying to understand how the driver manages to send/TX multiple bytes inside the same Interrupt handler (LIN_LPUART1_RxTx_IRQHandler)

riglesias2021_0-1624008628638.png

From my understanding, a LIN response can contain multiple data bytes, so if the interrupt is triggered because the driver have received 1 byte, the driver should be able to respond with multiple data bytes as described in the Figure 2.3. However, inspecting the code

                if (LPUART_GetStatusFlag(base, LPUART_RX_DATA_REG_FULL))
                {
                    /* Get data from Data Register & Clear LPUART_RX_DATA_REG_FULL flag */
                    LPUART_Getchar(base, &tmpByte);

                    /* Process data in Data Register while receive, send data */
                    LIN_LPUART_DRV_ProcessFrame(instancetmpByte);
                }
I see that only one call of LPUART_PutChar() is made every LPUART_RX_DATA_REG_FULL interrupt is triggered, so i think that only only one byte is transmitted for each byte received. Could anybody clarify this? Thanks

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
2 返答(返信)

812件の閲覧回数
jancy
Contributor I

Hi,

I'm testing the LIN driver with LIN interface layer the Tx header TX response is updating ,for Tx header Rx response the register level LIN_LPUART1_RxTx_IRQHandler()  the rx data was not updating . 

Note: At the driver level the Tx and RX working fine.

 

jancy_0-1731675257788.pngjancy_1-1731675277952.png

 

0 件の賞賛
返信

1,936件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes byte by byte process is done. For each byte received LIN_LPUART_DRV_ProcessFrame is called and upon driver state new byte will be received or send. 

BR, Petr

0 件の賞賛
返信