LPC54618 Card LIN Support

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

LPC54618 Card LIN Support

1,313 Views
canbazonur
Contributor II

LPC54618 support SPI, UART etc. but I am not sure it is possible to implement LINBUS communication with these cards? If yes, is there any example code like mCAN example ?

Labels (4)
Tags (1)
7 Replies

962 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Anıl Onur Canbaz,

Please notice in the user manual, table 430 that you can configure the UART in order to work as an LINBUS. The thing of LIN protocol is that at the beginning you have to send a 13 bit synch break, apart from that all the packages are the same as the UART. By activating the bit LINMODE in the CFG register you configure the UART to generate the synch break. 

pastedImage_1.png

Unfortunately,  we don't have a example of this but definitely you can use one of the examples of the UART as a guide for your project with LIN.  

Link to the user manual

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos

962 Views
canbazonur
Contributor II

I have no idea how can I change the register value of LINMODE. Could you send one example code ? I could not find any terms related with this register under _usart_config structure.

pastedImage_1.png

0 Kudos

962 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Anıl Onur Canbaz,

In the file LPC54608.h of the SDK you have the mask to activate the LIN mode. 

pastedImage_1.png

So you just need to write to the CFG register using this define. 

pastedImage_2.png

Regards,

Victor. 

0 Kudos

962 Views
canbazonur
Contributor II

Thanks for feedback Victor. Unfortunately, there are still too many questions (Master-Slave setting, pin configuration, data length etc.) since all settings should be converted into the LIN protocol setting. I noticed that there is no example code to use LIN protocol for any NXP LPC54xx card. In my opinion, example LIN code could be created by NXP to help customer. Don't we have any chance to get ?

Thanks and Regards.

0 Kudos

962 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Anıl Onur Canbaz,

I recommend you check the following community post where one of my coworker explained in a more detail way about the LIN bus of the LPC546xx and provided an example project.

Break detection on LPC 546xx 

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

962 Views
canbazonur
Contributor II

Thanks for example Victor, it is too helpful.

I noticed that there is no LIN transceiver on NXP LPC546xx board so I need to add LIN transciever module adding evaluation board to communicate two boards together.

Have a nice day !

Onur.

962 Views
canbazonur
Contributor II

Thanks for feedback Victor. Only thing that data size of USART can be set up to 9 bit but this value should be enlarged to 8 byte for LIN protocol. How can we set this parameter with the above configurations for LIN?

0 Kudos