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.
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.
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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.
Hello Anıl Onur Canbaz,
In the file LPC54608.h of the SDK you have the mask to activate the LIN mode.
So you just need to write to the CFG register using this define.
Regards,
Victor.
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.
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.
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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.
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?