LPC55s16 Received Lin Break issue

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

LPC55s16 Received Lin Break issue

Jump to solution
309 Views
vcuongnv91
Contributor II
Have a nice day, everybody...
I am working with Lin project using LPC55s16 following this example: 
 
My trouble is: Following PERI_USART.h in this project, the flag for detect break is set if Un_RXD pin remains low for 16 bit times ~ 800us at baudrate 19200. So it can not detect lin frames with lin break < 800us. Those frames are seem to be error frames
I have tested my program on Canoe, it can work normally. On Ossilo, Lin frames send by Canoe have Lin break ~ 900us. When connect to Ecus, lin frames have lin break ~ 700us then my program can not get any lin frames. So i think the trouble is on library.
 
#define USART_STAT_RXBRK_MASK (0x400U)
#define USART_STAT_RXBRK_SHIFT (10U)
/*! RXBRK - Received Break. This bit reflects the current state of the receiver break detection logic. It is set when the Un_RXD pin remains low for 16 bit times. Note that FRAMERRINT will also be set when this condition occurs because the stop bit(s) for the character would be missing. RXBRK is cleared when the Un_RXD pin goes high.*/
 
This Lin example is released in 2021 so maybe it is outdate. Do we have any newer example or library for LPC55xx for corecting this issue.
Thankyou very much for your support.
Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
207 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @vcuongnv91 

Snipaste_2026-04-13_14-57-02.png

Based on the LPC55S1x documentation, LPC55S16 should detect a ~700 µs LIN break at 19200 baud only when USART LIN mode is actually enabled, and recently, we do not have  new demos.

BR

Harry

View solution in original post

0 Kudos
Reply
1 Reply
208 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @vcuongnv91 

Snipaste_2026-04-13_14-57-02.png

Based on the LPC55S1x documentation, LPC55S16 should detect a ~700 µs LIN break at 19200 baud only when USART LIN mode is actually enabled, and recently, we do not have  new demos.

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2346851%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC55s16%20Received%20Lin%20Break%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2346851%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3EHave%20a%20nice%20day%2C%20everybody...%3C%2FDIV%3E%3CDIV%3EI%20am%20working%20with%20Lin%20project%20using%20LPC55s16%20following%20this%20example%3A%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FLPC-Microcontrollers-Knowledge%2FLPC55S16-LIN-basic-usage-example%2Fta-p%2F1223619%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FLPC-Microcontrollers-Knowledge%2FLPC55S16-LIN-basic-usage-example%2Fta-p%2F1223619%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EMy%20trouble%20is%3A%20Following%20PERI_USART.h%20in%20this%20project%2C%20the%20flag%20for%20detect%20break%20is%20set%20if%20Un_RXD%20pin%20remains%20low%20for%2016%20bit%20times%20~%20800us%20at%20baudrate%2019200.%20So%20it%20can%20not%20detect%20lin%20frames%20with%20lin%20break%20%26lt%3B%20800us.%20Those%20frames%20are%20seem%20to%20be%20error%20frames%3C%2FDIV%3E%3CDIV%3EI%20have%20tested%20my%20program%20on%20Canoe%2C%20it%20can%20work%20normally.%20On%20Ossilo%2C%20Lin%20frames%20send%20by%20Canoe%20have%20Lin%20break%20~%20900us.%20When%20connect%20to%20Ecus%2C%20lin%20frames%20have%20lin%20break%20~%20700us%20then%20my%20program%20can%20not%20get%20any%20lin%20frames.%20So%20i%20think%20the%20trouble%20is%20on%20library.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%23define%20USART_STAT_RXBRK_MASK%20(0x400U)%3C%2FDIV%3E%3CDIV%3E%23define%20USART_STAT_RXBRK_SHIFT%20(10U)%3C%2FDIV%3E%3CDIV%3E%2F*!%20RXBRK%20-%20Received%20Break.%20This%20bit%20reflects%20the%20current%20state%20of%20the%20receiver%20break%20detection%20logic.%20It%20is%20set%20when%20the%20Un_RXD%20pin%20remains%20low%20for%2016%20bit%20times.%20Note%20that%20FRAMERRINT%20will%20also%20be%20set%20when%20this%20condition%20occurs%20because%20the%20stop%20bit(s)%20for%20the%20character%20would%20be%20missing.%20RXBRK%20is%20cleared%20when%20the%20Un_RXD%20pin%20goes%20high.*%2F%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThis%20Lin%20example%20is%20released%20in%202021%20so%20maybe%20it%20is%20outdate.%20Do%20we%20have%20any%20newer%20example%20or%20library%20for%20LPC55xx%20for%20corecting%20this%20issue.%3C%2FDIV%3E%3CDIV%3EThankyou%20very%20much%20for%20your%20support.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2346851%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELPC55xx%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2349931%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC55s16%20Received%20Lin%20Break%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2349931%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F252537%22%20target%3D%22_blank%22%3E%40vcuongnv91%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snipaste_2026-04-13_14-57-02.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snipaste_2026-04-13_14-57-02.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382098i7FC4B10F360AC929%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Snipaste_2026-04-13_14-57-02.png%22%20alt%3D%22Snipaste_2026-04-13_14-57-02.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBased%20on%20the%20LPC55S1x%20documentation%2C%20LPC55S16%20should%20detect%20a%20~700%20%C2%B5s%20LIN%20break%20at%2019200%20baud%20only%20when%20USART%20LIN%20mode%20is%20actually%20enabled%2C%20and%26nbsp%3Brecently%2C%20we%20do%20not%20have%26nbsp%3B%20new%20demos.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E