RT1170 LIN driver development and stack porting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1170 LIN driver development and stack porting

RT1170 LIN driver development and stack porting

功能需求


RT117X系列MCU在汽车和工业类产品中有广泛应用,有很多客户对LIN通讯有需求,RT117612路独立的LPUART接口,最大支持的波特率能支持到20M,而且每一路都支持Break发送和中断接收,可以用来配合定时器实现LIN的主机和从机通讯。但是目前RT117XEVK板没有放置LIN的收发器,SDK也没有相关LIN的示例代码和LIN协议栈支持,所以本示例目的是移植KW36工程中的LIN 2.1版本的代码到RT1176 EVK板子上,在硬件上通过跳线将LIN Master主节点和 Slave从节点的LPUART TX/RX线连接到FRDM-KW36板载的LIN收发器TJA1027上,分别实现LIN 2.1版本协议栈在MasterSlave节点的通讯功能验证,同时还需支持Auto Baud Rate自动波特率调整。为客户做二次开发或者移植用户自己的LINstack提供底层驱动,提高开发效率。

代码包软件

 

  • RT1176 LIN Master节点代码:RT1170_LIN_Porting_Demo_Master.7z
  • RT1176 LIN Slave节点代码(支持自动波特率
  • RT1170_LIN_Porting_Demo_Slave_with_Auto_Baud_Rate.7z
  • 配置FRDM-KW36板载LIN 收发器的代码: KW36_LIN_PHY_Board_Init.7z

硬件Setup

 

  • MIMXRT1170-EVK2pcs,分别用作LIN Master节点和Slave节点。
  • FRDM-KW362pcs, 分别用作Master节点的收发器,和 Slave节点的收发器

下图是系统连接,2块RT1170 EVK板分别和2块FRDM-KW36板通过Arduino接口连接在一起,然后将两块KW36之间的LIN收发器通过 J13 连接在一起,需要使用外部12V adapter为FRDM-KW36供电,否则板上的LIN收发器无法工作。特别强调的是,如果需要使能自动波特率检测的话,还需要将Slave节点RT1176 Arduino接口的J9-Pin2引脚连接到RT1176 Arduino接口的J9-Pin12引脚,作为Timer 脉冲捕捉的输入,即可完成系统硬件的setup。

ningningyub452_0-1634264986174.png

 

软件Setup:

 

在以上硬件连接完成后,按照如下步骤下载对应软件:

- Step1: 下载KW36_LIN_PHY_Board_Init.7z代码到两块FRDM-KW36板子上;

 该代码中主要实现两个功能:第1个拉高板子的PTC5引脚,唤醒LIN收发器TJA1027。第2个将PTA18引脚配置成disable高阻状态。如果该引脚作为GPIO输出或者LPUART TX功能,会导致LIN slave回应数据出错(bit位丢失或者错误)。究其原因猜测应该是短路导致,当这个引脚作为GPIO输出或者LPUART TX功能,内部会有上拉,当RX1176 TX引脚输出Low时,由于电路上没有串联电阻(板子上使用的0Ω),会导致引脚上出现大电流。尤其是第2个点,花费了很多时间去查这个问题,从波形去看,是有数据输出的,但只是数据不对,很具有迷惑性。当然如果客户是自己打的板子,板子上已经有LIN收发器就不需要这一步,直接跳到Step2即可。

- Step2: 下载RT1170_LIN_Porting_Demo_Master.7z代码到作为Master节点的IMRT1176-EVK板;

- Step3: 下载RT1170_LIN_Porting_Demo_Slave_with_Auto_Baud_Rate.7z代码到作为Slave节点的IMRT1176-EVK板,如果需要使能自动波特率调整,需要配置宏linUserConfigSlave.autobaudEnable = true; 代码中默认是打开的。

实验结果

 

打开两个IMRT1176-EVK板串口,波特率配置115200,单击RT1176 Master节点上的按键SW7,便可以启动Master节点开始发送数据,通讯波形和串口打印信息如下两张图所示。

ningningyub452_1-1634265003766.pngningningyub452_2-1634265020400.png

 

代码移植的几个难点

 

1. LIN通讯协议栈的调度流程的理解,包括Wakeup段,Break段,Sync段,PID段,Data段的状态切换和跳转,每个段的超时监测和错误处理,其核心思想有两个:一个在于LIN的RX引脚要不断去monitor TX引脚的状态,然后去切换状态机,具体调度的流程在后文会详细介绍,这里不展开。第二个是准确获取在每个段的定时器时间,尤其是超时超过一个overflow周期的情况,需要对timerGetTimeIntervalCallback0函数有理解。

2. 自动波特率调整功能的支持,该功能的原理是测量SYNC段的8个脉冲的脉宽,如果每个脉宽差异在2%范围内,再根据脉冲宽度去判断对应的波特率。在原来KW36的代码中是使用TPM的Overflow中断来作为计时,Edge中断来触发,而RT1176没有TPM,只能使用Qtimer (Qtimer功能上要更强于TPM),但是不巧的是Qtimer不支持Overflow中断(参见芯片ERRATA 050194),所以只能使用compare中断来实现类似的功能,而原有的计时定时计算都是基于overflow的,因此就需要对定时器部分的代码做大范围的更改。

应用中考虑到timerGetTimeIntervalCallback0函数在自动波特率调整时和超时监测处理时的一致性,最好使用同一个Timer的同一个channel,这就需要这个Timer既支持普通的定时中断模式,又支持input capture功能。对于TPM来说,是无法实现的因为两次在寄存器配置上时互斥的, 参见下图。幸运的是Qtimer支持这个feature,只是需要根据SDK代码做些配置

ningningyub452_3-1634265149034.png

前面提到,需要QTimer支持input capture功能, 触发信号是LPUART_RX引脚的信号,需要硬件loop到Qtimer支持的硬件引脚上,对于KW36来说,只需要把这两个物理引脚连接在一起即可,但对RT1176来说, 只有这一步还不行,还需要对XBAR进行配置,将Qtimer的TIMER 1的触发引脚(合计有4个物理引脚)Link到QTIMER对应的Channel上,因为RT1176有4个QTimer,每个Qtimer有4个通道,标称的Qtimer trigger pin有4个,那具体哪个pin触发哪个QTimer的哪个通道,是需要配置的。如果客户没有使用过XBAR配置起来有难度,还好MCUXpresso config tool支持配置,可以简便的完成配置。示例代码和触发关系如下,如果实际硬件使用的物理引脚有区别,需要对应修改。

RT的XBAR功能非常强大,或许可以不使用外部的物理连线,直接将Qtimer的出发引脚的信号直接在内部Loop到LPUART_RX引脚,这样就更加灵活,此处只提供一个思路,不再进一步延伸。
IOMUXC_GPR->GPR15 = ((IOMUXC_GPR->GPR15 &
(~(IOMUXC_GPR_GPR15_QTIMER4_TRM1_INPUT_SEL_MASK | IOMUXC_GPR_GPR15_QTIMER4_TRM2_INPUT_SEL_MASK)))/*Mask bits to zero which are setting*/
| IOMUXC_GPR_GPR15_QTIMER4_TRM1_INPUT_SEL(0x00U) /*QTIMER4 TMR1 input select: 0x00U*/
| IOMUXC_GPR_GPR15_QTIMER4_TRM2_INPUT_SEL(0x00U) /*QTIMER4 TMR2 input select: 0x00U*/
);
ningningyub452_4-1634265379921.png

4. 在状态机切换和超时以及错误处理过程中,经常会看到两种模式Sleep模式和Idle模式,区别是什么呢?

LIN_LPUART_GoToSleepMode: 函数会关闭Break中断,RX接收中断,帧错误中断,保留RX边沿
中断
;
LIN_LPUART_GotoIdleState
函数会打开Break中断,RX接收中断,帧错误中断,关闭RX边沿中
;

实际通讯波形

 

Master作为Subscribe角色时,发送Header,由Slave发送Respone

ningningyub452_5-1634265482097.png

Master作为PUBLIC角色时,同时发送Header,以及Respone

ningningyub452_6-1634265504026.png

按照调度表依次发送LI0_lin_configuration_RAM数组定义的PID数据

 static uint8_t LI0_lin_configuration_RAM[LI0_LIN_SIZE_OF_CFG]= {0x00, 0x30, 0x33, 0x36,
0x2D, 0x3C, 0x3D ,0xFF};
ningningyub452_7-1634265566036.png

Qtimer准确读取wake up信号的脉冲宽度

ningningyub452_8-1634265585382.png

Slave使能Auto baud rate后读取到的每个脉冲宽度数据

ningningyub452_9-1634265608214.png

免责声明:


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, *INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUTNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, ORPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY,WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE)

Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1356144%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERT1170%20LIN%20driver%20development%20and%20stack%20porting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1356144%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22lia-message-template-symptoms-zone%22%3E%0A%3CH2%20id%3D%22toc-hId--1354410642%22%20id%3D%22toc-hId--493778506%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3EFunctional%20requirements%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3EThe%20RT117X%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eseries%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3EMCU%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eis%20widely%20used%20in%20automotive%20and%20industrial%20products.%20Many%20customers%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3Ehave%20requirements%3C%2FSPAN%3E%20for%20LIN%20communication.%20%3CSPAN%20class%3D%22fontstyle1%22%3EThe%20RT1176%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Ehas%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3E12%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eindependent%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3ELPUART%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Einterfaces%2C%20and%20the%20maximum%20supported%20baud%20rate%20can%20support%20up%20to%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3E20M%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3E.%20Each%20interface%20supports%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3EBreak%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Esending%20and%20interrupt%20receiving%2C%20which%20can%20be%20used%20to%20cooperate%20with%20the%20timer%20to%20realize%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3ELIN%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Ehost%20and%20slave%20communication.%20However%3C%2FSPAN%3E%20%2C%20the%20%3CSPAN%20class%3D%22fontstyle1%22%3ERT117X%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3EEVK%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3Eboard%20currently%20does%20not%20have%3C%2FSPAN%3E%20a%20%3CSPAN%20class%3D%22fontstyle1%22%3ELIN%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Etransceiver%2C%20and%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20SDK%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20does%20not%20have%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3Esample%20code%20and%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3ELIN%3C%2FSPAN%3E%20protocol%20stack%20support%20for%20related%20LIN%20%3CSPAN%20class%3D%22fontstyle2%22%3E.%20Therefore%2C%20the%20purpose%20of%20this%20example%20is%20to%20transplant%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20LIN%202.1%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eversion%20code%3C%2FSPAN%3E%20in%20the%20KW36%20project%20to%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20RT1176%20EVK%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eboard%20%2C%20and%20connect%20the%20LPUART%20TX%2FRX%20lines%20of%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20LIN%20Master%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Enode%20and%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20Slave%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3Enode%20to%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20LIN%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Etransceiver%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3ETJA1027%3C%2FSPAN%3E%20on%20the%20FRDM-KW36%20board%20through%20jumpers%20in%20hardware%2C%20%3CSPAN%20class%3D%22fontstyle2%22%3Erespectively%2C%20to%20realize%3C%2FSPAN%3E%20the%20communication%20function%20verification%20of%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20LIN%202.1%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eversion%20protocol%20stack%20in%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Ethe%20Master%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eand%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3ESlave%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Enodes%2C%20and%20also%20support%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3EAuto%20Baud%20Rate%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle2%22%3Eautomatic%20baud%20rate%20adjustment.%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3EProvide%20underlying%20drivers%3C%2FSPAN%3E%20for%20customers%20to%20do%20secondary%20development%20or%20migrate%20their%20own%20LINstack%20to%20improve%20development%20efficiency.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1133102191%22%20id%3D%22toc-hId-1993734327%22%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3CSPAN%20class%3D%22fontstyle0%22%3ECode%20package%20software%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3CSPAN%20class%3D%22fontstyle0%22%3ERT1176%20LIN%20Master%3C%2FSPAN%3E%20node%20code%3A%20%3CSPAN%20class%3D%22fontstyle0%22%3ERT1170_LIN_Porting_Demo_Master.7z%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3ERT1176%20LIN%20Slave%3C%2FSPAN%3E%20node%20code%20%3CSPAN%20class%3D%22fontstyle0%22%3E(%3C%2FSPAN%3E%20supports%20automatic%20baud%20rate%3CSPAN%20class%3D%22fontstyle0%22%3E%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3ERT1170_LIN_Porting_Demo_Slave_with_Auto_Baud_Rate.7z%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3ECode%20to%20configure%20%3CSPAN%20class%3D%22fontstyle0%22%3Ethe%20FRDM-KW36%3C%2FSPAN%3E%20onboard%20%3CSPAN%20class%3D%22fontstyle0%22%3ELIN%3C%2FSPAN%3E%20transceiver%20%3CSPAN%20class%3D%22fontstyle0%22%3E%3A%20KW36_LIN_PHY_Board_Init.7z%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--674352272%22%20id%3D%22toc-hId-186279864%22%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20%E7%A1%AC%E4%BB%B6%3CSPAN%20class%3D%22fontstyle1%22%3ESetup%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3EMIMXRT1170-EVK%20%3CSPAN%20class%3D%22fontstyle3%22%3E%3A%3C%2FSPAN%3E%202pcs%20%3CSPAN%20class%3D%22fontstyle3%22%3E%2C%20used%20as%3C%2FSPAN%3E%20LIN%20Master%20%3CSPAN%20class%3D%22fontstyle3%22%3Enode%20and%3C%2FSPAN%3E%20Slave%20%3CSPAN%20class%3D%22fontstyle3%22%3Enode%20respectively.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3EFRDM-KW36%3A%3CSPAN%20class%3D%22fontstyle3%22%3E%20%3C%2FSPAN%3E2pcs%2C%3CSPAN%20class%3D%22fontstyle3%22%3E%20used%20as%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle3%22%3E%20the%20transceiver%20of%20the%3C%2FSPAN%3E%20Master%20node%20and%20the%20transceiver%3CSPAN%20class%3D%22fontstyle3%22%3E%20of%20the%3C%2FSPAN%3E%20Slave%20node%20respectively%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-message-template-solution-zone%22%3E%0A%3CP%3EThe%20following%20figure%20shows%20the%20system%20connection.%20Two%20RT1170%20EVK%20boards%20are%20connected%20to%20two%20FRDM-KW36%20boards%20through%20the%20Arduino%20interface%2C%20and%20then%20the%20LIN%20transceivers%20between%20the%20two%20KW36%20boards%20are%20connected%20through%20J13.%20An%20external%2012V%20adapter%20is%20required%20to%20power%20the%20FRDM-KW36%2C%20otherwise%20the%20LIN%20transceiver%20on%20the%20board%20will%20not%20work.%20It%20is%20particularly%20emphasized%20that%20if%20automatic%20baud%20rate%20detection%20needs%20to%20be%20enabled%2C%20the%20J9-Pin2%20pin%20of%20the%20Slave%20node%20RT1176%20Arduino%20interface%20needs%20to%20be%20connected%20to%20the%20J9-Pin12%20pin%20of%20the%20RT1176%20Arduino%20interface%20as%20the%20input%20of%20the%20Timer%20pulse%20capture%2C%20and%20the%20system%20hardware%20setup%20can%20be%20completed.%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_0-1634264986174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_0-1634264986174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159157iA89081D1BAE83C71%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_0-1634264986174.png%22%20alt%3D%22ningningyub452_0-1634264986174.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CH2%20id%3D%22toc-hId-1813160561%22%20id%3D%22toc-hId--1621174599%22%3ESoftware%20Setup%3A%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAfter%20the%20above%20hardware%20connections%20are%20completed%2C%20follow%20the%20steps%20below%20to%20download%20the%20corresponding%20software%3A%3C%2FP%3E%0A%3CP%3E-%20%3CSTRONG%3EStep1%3C%2FSTRONG%3E%20%3A%20Download%20KW36_LIN_PHY_Board_Init.7z%20code%20to%20two%20FRDM-KW36%20boards%3B%3C%2FP%3E%0A%3CPRE%20translate%3D%22no%22%3E%26nbsp%3B%E8%AF%A5%E4%BB%A3%E7%A0%81%E4%B8%AD%E4%B8%BB%E8%A6%81%E5%AE%9E%E7%8E%B0%E4%B8%A4%E4%B8%AA%E5%8A%9F%E8%83%BD%EF%BC%9A%E7%AC%AC1%E4%B8%AA%E6%8B%89%E9%AB%98%E6%9D%BF%E5%AD%90%E7%9A%84PTC5%E5%BC%95%E8%84%9A%EF%BC%8C%E5%94%A4%E9%86%92LIN%E6%94%B6%E5%8F%91%E5%99%A8TJA1027%E3%80%82%E7%AC%AC2%E4%B8%AA%E5%B0%86PTA18%E5%BC%95%E8%84%9A%E9%85%8D%E7%BD%AE%E6%88%90disable%E9%AB%98%E9%98%BB%E7%8A%B6%E6%80%81%E3%80%82%E5%A6%82%E6%9E%9C%E8%AF%A5%E5%BC%95%E8%84%9A%E4%BD%9C%E4%B8%BAGPIO%E8%BE%93%E5%87%BA%E6%88%96%E8%80%85LPUART%20TX%E5%8A%9F%E8%83%BD%EF%BC%8C%E4%BC%9A%E5%AF%BC%E8%87%B4LIN%20slave%E5%9B%9E%E5%BA%94%E6%95%B0%E6%8D%AE%E5%87%BA%E9%94%99(bit%E4%BD%8D%E4%B8%A2%E5%A4%B1%E6%88%96%E8%80%85%E9%94%99%E8%AF%AF)%E3%80%82%E7%A9%B6%E5%85%B6%E5%8E%9F%E5%9B%A0%E7%8C%9C%E6%B5%8B%E5%BA%94%E8%AF%A5%E6%98%AF%E7%9F%AD%E8%B7%AF%E5%AF%BC%E8%87%B4%EF%BC%8C%E5%BD%93%E8%BF%99%E4%B8%AA%E5%BC%95%E8%84%9A%E4%BD%9C%E4%B8%BAGPIO%E8%BE%93%E5%87%BA%E6%88%96%E8%80%85LPUART%20TX%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%86%85%E9%83%A8%E4%BC%9A%E6%9C%89%E4%B8%8A%E6%8B%89%EF%BC%8C%E5%BD%93RX1176%20TX%E5%BC%95%E8%84%9A%E8%BE%93%E5%87%BALow%E6%97%B6%EF%BC%8C%E7%94%B1%E4%BA%8E%E7%94%B5%E8%B7%AF%E4%B8%8A%E6%B2%A1%E6%9C%89%E4%B8%B2%E8%81%94%E7%94%B5%E9%98%BB(%E6%9D%BF%E5%AD%90%E4%B8%8A%E4%BD%BF%E7%94%A8%E7%9A%840%CE%A9)%EF%BC%8C%E4%BC%9A%E5%AF%BC%E8%87%B4%E5%BC%95%E8%84%9A%E4%B8%8A%E5%87%BA%E7%8E%B0%E5%A4%A7%E7%94%B5%E6%B5%81%E3%80%82%E5%B0%A4%E5%85%B6%E6%98%AF%E7%AC%AC2%E4%B8%AA%E7%82%B9%EF%BC%8C%E8%8A%B1%E8%B4%B9%E4%BA%86%E5%BE%88%E5%A4%9A%E6%97%B6%E9%97%B4%E5%8E%BB%E6%9F%A5%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%8C%E4%BB%8E%E6%B3%A2%E5%BD%A2%E5%8E%BB%E7%9C%8B%EF%BC%8C%E6%98%AF%E6%9C%89%E6%95%B0%E6%8D%AE%E8%BE%93%E5%87%BA%E7%9A%84%EF%BC%8C%E4%BD%86%E5%8F%AA%E6%98%AF%E6%95%B0%E6%8D%AE%E4%B8%8D%E5%AF%B9%EF%BC%8C%E5%BE%88%E5%85%B7%E6%9C%89%E8%BF%B7%E6%83%91%E6%80%A7%E3%80%82%E5%BD%93%E7%84%B6%E5%A6%82%E6%9E%9C%E5%AE%A2%E6%88%B7%E6%98%AF%E8%87%AA%E5%B7%B1%E6%89%93%E7%9A%84%E6%9D%BF%E5%AD%90%EF%BC%8C%E6%9D%BF%E5%AD%90%E4%B8%8A%E5%B7%B2%E7%BB%8F%E6%9C%89LIN%E6%94%B6%E5%8F%91%E5%99%A8%E5%B0%B1%E4%B8%8D%E9%9C%80%E8%A6%81%E8%BF%99%E4%B8%80%E6%AD%A5%EF%BC%8C%E7%9B%B4%E6%8E%A5%E8%B7%B3%E5%88%B0Step2%E5%8D%B3%E5%8F%AF%E3%80%82%3C%2FPRE%3E%0A%3CP%3E-%20%3CSTRONG%3EStep2%3C%2FSTRONG%3E%20%3A%20Download%20the%20RT1170_LIN_Porting_Demo_Master.7z%20code%20to%20the%20IMRT1176-EVK%20board%20that%20serves%20as%20the%20Master%20node%3B%3C%2FP%3E%0A%3CP%3E-%20%3CSTRONG%3EStep3%3C%2FSTRONG%3E%20%3A%20Download%20the%20RT1170_LIN_Porting_Demo_Slave_with_Auto_Baud_Rate.7z%20code%20to%20the%20IMRT1176-EVK%20board%20as%20the%20Slave%20node.%20If%20you%20need%20to%20enable%20automatic%20baud%20rate%20adjustment%2C%20you%20need%20to%20configure%20the%20macro%20linUserConfigSlave.autobaudEnable%20%3D%20true%3B%20It%20is%20turned%20on%20by%20default%20in%20the%20code.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-5706098%22%20id%3D%22toc-hId-866338234%22%3EExperimental%20Results%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CP%3EOpen%20the%20two%20IMRT1176-EVK%20board%20serial%20ports%2C%20set%20the%20baud%20rate%20to%20115200%2C%20and%20click%20the%20SW7%20button%20on%20the%20RT1176%20Master%20node%20to%20start%20the%20Master%20node%20to%20send%20data.%20The%20communication%20waveform%20and%20serial%20port%20print%20information%20are%20shown%20in%20the%20following%20two%20figures.%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_1-1634265003766.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_1-1634265003766.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159158i01E45BC01CBA4FFB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_1-1634265003766.png%22%20alt%3D%22ningningyub452_1-1634265003766.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_2-1634265020400.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_2-1634265020400.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159159i6EEE1E923BC59808%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_2-1634265020400.png%22%20alt%3D%22ningningyub452_2-1634265020400.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CH2%20id%3D%22toc-hId--1801748365%22%20id%3D%22toc-hId--941116229%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-685764468%22%20id%3D%22toc-hId-1546396604%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%E4%BB%A3%E7%A0%81%E7%A7%BB%E6%A4%8D%E7%9A%84%E5%87%A0%E4%B8%AA%E9%9A%BE%E7%82%B9%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CP%3E1.%20Understanding%20of%20the%20scheduling%20process%20of%20the%20LIN%20communication%20protocol%20stack%2C%20including%20the%20state%20switching%20and%20jumping%20of%20the%20Wakeup%20segment%2C%20Break%20segment%2C%20Sync%20segment%2C%20PID%20segment%2C%20and%20Data%20segment%2C%20and%20the%20timeout%20monitoring%20and%20error%20handling%20of%20each%20segment.%20There%20are%20two%20core%20ideas%3A%20one%20is%20that%20the%20LIN%20RX%20pin%20must%20continuously%20monitor%20the%20state%20of%20the%20TX%20pin%20and%20then%20switch%20the%20state%20machine.%20The%20specific%20scheduling%20process%20will%20be%20introduced%20in%20detail%20later%20and%20will%20not%20be%20expanded%20here.%20The%20second%20is%20to%20accurately%20obtain%20the%20timer%20time%20in%20each%20segment%2C%20especially%20when%20the%20timeout%20exceeds%20an%20overflow%20cycle%2C%20you%20need%20to%20understand%20the%20timerGetTimeIntervalCallback0%20function.%3C%2FP%3E%0A%3CP%3E2.%20Support%20for%20automatic%20baud%20rate%20adjustment%20function.%20The%20principle%20of%20this%20function%20is%20to%20measure%20the%20pulse%20width%20of%20the%208%20pulses%20of%20the%20SYNC%20segment.%20If%20the%20difference%20of%20each%20pulse%20width%20is%20within%202%25%2C%20the%20corresponding%20baud%20rate%20is%20determined%20based%20on%20the%20pulse%20width.%20In%20the%20original%20KW36%20code%2C%20the%20Overflow%20interrupt%20of%20TPM%20is%20used%20as%20the%20timing%2C%20and%20the%20Edge%20interrupt%20is%20used%20to%20trigger.%20However%2C%20RT1176%20does%20not%20have%20TPM%2C%20so%20it%20can%20only%20use%20Qtimer%20(Qtimer%20is%20more%20powerful%20than%20TPM%20in%20terms%20of%20function).%20Unfortunately%2C%20Qtimer%20does%20not%20support%20Overflow%20interrupt%20(see%20chip%20ERRATA%20050194)%2C%20so%20only%20compare%20interrupt%20can%20be%20used%20to%20implement%20similar%20functions.%20The%20original%20timing%20calculation%20is%20based%20on%20overflow%2C%20so%20it%20is%20necessary%20to%20make%20large-scale%20changes%20to%20the%20timer%20code.%3C%2FP%3E%0A%3CPRE%20translate%3D%22no%22%3E%E5%BA%94%E7%94%A8%E4%B8%AD%E8%80%83%E8%99%91%E5%88%B0timerGetTimeIntervalCallback0%E5%87%BD%E6%95%B0%E5%9C%A8%E8%87%AA%E5%8A%A8%E6%B3%A2%E7%89%B9%E7%8E%87%E8%B0%83%E6%95%B4%E6%97%B6%E5%92%8C%E8%B6%85%E6%97%B6%E7%9B%91%E6%B5%8B%E5%A4%84%E7%90%86%E6%97%B6%E7%9A%84%E4%B8%80%E8%87%B4%E6%80%A7%EF%BC%8C%E6%9C%80%E5%A5%BD%E4%BD%BF%E7%94%A8%E5%90%8C%E4%B8%80%E4%B8%AATimer%E7%9A%84%E5%90%8C%E4%B8%80%E4%B8%AAchannel%EF%BC%8C%E8%BF%99%E5%B0%B1%E9%9C%80%E8%A6%81%E8%BF%99%E4%B8%AATimer%E6%97%A2%E6%94%AF%E6%8C%81%E6%99%AE%E9%80%9A%E7%9A%84%E5%AE%9A%E6%97%B6%E4%B8%AD%E6%96%AD%E6%A8%A1%E5%BC%8F%EF%BC%8C%E5%8F%88%E6%94%AF%E6%8C%81input%20capture%E5%8A%9F%E8%83%BD%E3%80%82%E5%AF%B9%E4%BA%8ETPM%E6%9D%A5%E8%AF%B4%EF%BC%8C%E6%98%AF%E6%97%A0%E6%B3%95%E5%AE%9E%E7%8E%B0%E7%9A%84%E5%9B%A0%E4%B8%BA%E4%B8%A4%E6%AC%A1%E5%9C%A8%E5%AF%84%E5%AD%98%E5%99%A8%E9%85%8D%E7%BD%AE%E4%B8%8A%E6%97%B6%E4%BA%92%E6%96%A5%E7%9A%84%2C%20%E5%8F%82%E8%A7%81%E4%B8%8B%E5%9B%BE%E3%80%82%E5%B9%B8%E8%BF%90%E7%9A%84%E6%98%AFQtimer%E6%94%AF%E6%8C%81%E8%BF%99%E4%B8%AAfeature%EF%BC%8C%E5%8F%AA%E6%98%AF%E9%9C%80%E8%A6%81%E6%A0%B9%E6%8D%AESDK%E4%BB%A3%E7%A0%81%E5%81%9A%E4%BA%9B%E9%85%8D%E7%BD%AE%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_3-1634265149034.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_3-1634265149034.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159160iFE937C31CB156BE2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_3-1634265149034.png%22%20alt%3D%22ningningyub452_3-1634265149034.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAs%20mentioned%20above%2C%20QTimer%20needs%20to%20support%20input%20capture%20function.%20The%20trigger%20signal%20is%20the%20signal%20of%20LPUART_RX%20pin.%20Hardware%20loop%20is%20required%20to%20Qtimer%20supported%20hardware%20pin.%20For%20KW36%2C%20it%20is%20only%20necessary%20to%20connect%20these%20two%20physical%20pins%20together.%20But%20for%20RT1176%2C%20this%20step%20is%20not%20enough.%20XBAR%20needs%20to%20be%20configured%20to%20link%20the%20trigger%20pin%20of%20TIMER%201%20of%20Qtimer%20(a%20total%20of%204%20physical%20pins)%20to%20the%20corresponding%20channel%20of%20QTIMER.%20Because%20RT1176%20has%204%20QTimers%2C%20each%20Qtimer%20has%204%20channels%2C%20and%20there%20are%204%20nominal%20Qtimer%20trigger%20pins%2C%20which%20pin%20triggers%20which%20channel%20of%20which%20QTimer%20needs%20to%20be%20configured.%20If%20the%20customer%20has%20not%20used%20XBAR%2C%20it%20is%20difficult%20to%20configure.%20Fortunately%2C%20MCUXpresso%20config%20tool%20supports%20configuration%20and%20can%20easily%20complete%20the%20configuration.%20The%20relationship%20between%20the%20sample%20code%20and%20the%20trigger%20is%20as%20follows.%20If%20the%20physical%20pins%20used%20by%20the%20actual%20hardware%20are%20different%2C%20corresponding%20modifications%20are%20required.%3C%2FP%3E%0A%3CPRE%20translate%3D%22no%22%3ERT%E7%9A%84XBAR%E5%8A%9F%E8%83%BD%E9%9D%9E%E5%B8%B8%E5%BC%BA%E5%A4%A7%EF%BC%8C%E6%88%96%E8%AE%B8%E5%8F%AF%E4%BB%A5%E4%B8%8D%E4%BD%BF%E7%94%A8%E5%A4%96%E9%83%A8%E7%9A%84%E7%89%A9%E7%90%86%E8%BF%9E%E7%BA%BF%EF%BC%8C%E7%9B%B4%E6%8E%A5%E5%B0%86Qtimer%E7%9A%84%E5%87%BA%E5%8F%91%E5%BC%95%E8%84%9A%E7%9A%84%E4%BF%A1%E5%8F%B7%E7%9B%B4%E6%8E%A5%E5%9C%A8%E5%86%85%E9%83%A8Loop%E5%88%B0LPUART_RX%E5%BC%95%E8%84%9A%EF%BC%8C%E8%BF%99%E6%A0%B7%E5%B0%B1%E6%9B%B4%E5%8A%A0%E7%81%B5%E6%B4%BB%EF%BC%8C%E6%AD%A4%E5%A4%84%E5%8F%AA%E6%8F%90%E4%BE%9B%E4%B8%80%E4%B8%AA%E6%80%9D%E8%B7%AF%EF%BC%8C%E4%B8%8D%E5%86%8D%E8%BF%9B%E4%B8%80%E6%AD%A5%E5%BB%B6%E4%BC%B8%E3%80%82%3C%2FPRE%3E%0A%3CPRE%20translate%3D%22no%22%3EIOMUXC_GPR-%26gt%3BGPR15%20%3D%20((IOMUXC_GPR-%26gt%3BGPR15%20%26amp%3B%3CBR%20%2F%3E(~(IOMUXC_GPR_GPR15_QTIMER4_TRM1_INPUT_SEL_MASK%20%7C%20IOMUXC_GPR_GPR15_QTIMER4_TRM2_INPUT_SEL_MASK)))%2F*Mask%20bits%20to%20zero%20which%20are%20setting*%2F%3CBR%20%2F%3E%7C%20IOMUXC_GPR_GPR15_QTIMER4_TRM1_INPUT_SEL(0x00U)%20%2F*QTIMER4%20TMR1%20input%20select%3A%200x00U*%2F%3CBR%20%2F%3E%7C%20IOMUXC_GPR_GPR15_QTIMER4_TRM2_INPUT_SEL(0x00U)%20%2F*QTIMER4%20TMR2%20input%20select%3A%200x00U*%2F%3CBR%20%2F%3E)%3B%3C%2FPRE%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_4-1634265379921.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_4-1634265379921.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159161i4C8A4372841EC091%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_4-1634265379921.png%22%20alt%3D%22ningningyub452_4-1634265379921.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E4.%20In%20the%20process%20of%20state%20machine%20switching%2C%20timeout%20and%20error%20handling%2C%20we%20often%20see%20two%20modes%3A%20Sleep%20mode%20and%20Idle%20mode.%20What%20is%20the%20difference%20between%20them%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3ELIN_LPUART_GoToSleepMode%3A%20The%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20function%20will%20turn%20off%20the%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20Break%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20interrupt%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20RX%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20receive%20interrupt%2C%20frame%20error%20interrupt%2C%20and%20retain%20the%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20RX%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3CBR%20%2F%3Eedge%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20interrupt%3B%3CBR%20%2F%3E%20The%20LIN_LPUART_GotoIdleState%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20function%20turns%20on%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20the%20Break%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20interrupt%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20RX%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20receive%20interrupt%2C%20and%20frame%20error%20interrupt%2C%20and%20turns%20off%20the%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20RX%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle2%22%3E%20%3CBR%20%2F%3Eedge%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20interrupt%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1121689995%22%20id%3D%22toc-hId--261057859%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3EActual%20communication%20waveform%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20When%20the%20Master%20%3CSPAN%20class%3D%22fontstyle1%22%3Eacts%20as%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Ea%20Subscriber%2C%20it%20sends%3C%2FSPAN%3E%20a%20Header%20%3CSPAN%20class%3D%22fontstyle1%22%3E%2C%20and%3C%2FSPAN%3E%20the%20Slave%20%3CSPAN%20class%3D%22fontstyle1%22%3Esends%3C%2FSPAN%3E%20a%20Response.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_5-1634265482097.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_5-1634265482097.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159162i9D55D99C9436863C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_5-1634265482097.png%22%20alt%3D%22ningningyub452_5-1634265482097.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3EWhen%20%3CSPAN%20class%3D%22fontstyle0%22%3Ethe%20Master%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Eacts%20as%3C%2FSPAN%3E%20a%20%3CSPAN%20class%3D%22fontstyle0%22%3EPUBLIC%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Erole%2C%20it%20sends%20both%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle0%22%3Ethe%20Header%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle1%22%3Eand%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22fontstyle0%22%3Ethe%20Response.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_6-1634265504026.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_6-1634265504026.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159163i29E6B6D7A158C851%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_6-1634265504026.png%22%20alt%3D%22ningningyub452_6-1634265504026.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle1%22%3ESend%20the%20PID%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20data%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20defined%20in%20the%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20LI0_lin_configuration_RAM%20array%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20in%20sequence%20according%20to%20the%20schedule%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20translate%3D%22no%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20static%20uint8_t%20LI0_lin_configuration_RAM%5BLI0_LIN_SIZE_OF_CFG%5D%3D%20%7B0x00%2C%200x30%2C%200x33%2C%200x36%2C%3CBR%20%2F%3E0x2D%2C%200x3C%2C%200x3D%20%2C0xFF%7D%3B%20%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_7-1634265566036.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_7-1634265566036.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159164i4352F95F42F79204%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_7-1634265566036.png%22%20alt%3D%22ningningyub452_7-1634265566036.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EQtimer%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20accurately%20reads%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20the%20pulse%20width%20of%20the%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20wake%20up%20signal%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_8-1634265585382.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_8-1634265585382.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159165i7DC61121D9FE34A6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_8-1634265585382.png%22%20alt%3D%22ningningyub452_8-1634265585382.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle1%22%3EEach%20pulse%20width%20data%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%20read%20after%20the%20slave%20enables%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3E%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3EAuto%20baud%20rate%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ningningyub452_9-1634265608214.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ningningyub452_9-1634265608214.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159166i9CF68B06989E4984%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ningningyub452_9-1634265608214.png%22%20alt%3D%22ningningyub452_9-1634265608214.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CH2%20id%3D%22toc-hId-1365822838%22%20id%3D%22toc-hId--2068512322%22%3E%3CSPAN%20class%3D%22fontstyle0%22%3EDisclaimer%3A%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle1%22%3ETHIS%20SOFTWARE%20IS%20PROVIDED%20BY%20THE%20COPYRIGHT%20HOLDERS%20AND%20CONTRIBUTORS%20%22AS%20IS%22%20AND%20*ANY%20EXPRESS%20OR%20IMPLIED%20WARRANTIES%2C%20INCLUDING%2C%20BUT%20NOT%20LIMITED%20TO%2C%20THE%20IMPLIED%20*WARRANTIES%20OF%20MERCHANTABILITY%20AND%20FITNESS%20FOR%20A%20PARTICULAR%20PURPOSE%20ARE%20DISCLAIMED.*%20IN%20NO%20EVENT%20SHALL%20THE%20COPYRIGHT%20HOLDER%20OR%20CONTRIBUTORS%20BE%20LIABLE%20FOR%20ANY%20DIRECT%2C%20*INDIRECT%2C%20INCIDENTAL%2C%20SPECIAL%2C%20EXEMPLARY%2C%20OR%20CONSEQUENTIAL%20DAMAGES%20(INCLUDING%2C%20*%20BUTNOT%20LIMITED%20TO%2C%20PROCUREMENT%20OF%20SUBSTITUTE%20GOODS%20OR%20SERVICES%3B%20LOSS%20OF%20USE%2C%20*%20DATA%2C%20ORPROFITS%3B%20OR%20BUSINESS%20INTERRUPTION)%20HOWEVER%20CAUSED%20AND%20ON%20ANY%20THEORY%20OF%20*%20LIABILITY%2CWHETHER%20IN%20CONTRACT%2C%20STRICT%20LIABILITY%2C%20OR%20TORT%20(INCLUDING%20NEGLIGENCE%20*%20OR%20OTHERWISE)%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1356144%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomotive%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎10-14-2021 07:58 PM
Updated by: