3789 views|5 replies

314

Posts

0

Resources
The OP
 

LIN Communication Problems [Copy link]

 When debugging LIN communication, I found that the value of the transmit data register (LINTDy) is the same as the value of the receive data register (LINRDy). Is this normal? In addition, when using polling to send data, the receive interrupt will also be triggered. Has anyone encountered this problem?
This post is from TI Technology Forum

Latest reply

This post was last edited by chunyang on 2018-11-9 11:56You should check your program carefully. The serial port interrupt is a mechanism of the MCU, not generated by the LIN interface chip itself. As long as you enable the receive interrupt in your program, the data output given by LIN will naturally cause the MCU to generate a receive interrupt. Don't enable the receive when you are sending, but enable it when you need to receive. If you enable the receive first, you need to clear the receive flag in the serial port receive register before enabling the receive interrupt. This is the minimum process flow of serial port programming.  Details Published on 2018-11-9 11:39
 

1w

Posts

142

Resources
2
 
If there is no independent transmit and receive control, and only one chip is enabled, then when the chip is enabled, because LIN is a single-wire bus, the transmit and receive are connected together internally, so it will definitely transmit and receive automatically. As long as there is a logic 0 on the bus, of course the receive interrupt will be triggered.
This post is from TI Technology Forum

Comments

A single transmission will not generate a receive interrupt. If the receive-send-receive-... cycle continues, the first transmission will not trigger a receive interrupt, but starting from the second transmission, each transmission will trigger a receive interrupt. I looked at the chip manual and didn't see this mechanism. LIN itself should not have this mechanism, right?  Details Published on 2018-11-9 08:27
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

3471

Posts

11

Resources
3
 
When polling is used to send data, the receiving interrupt will also be triggered. Is there anything connected to the pin? Check the program configuration to see if there is any setting such as automatic initialization.
This post is from TI Technology Forum

Comments

A single transmission will not generate a receive interrupt. If the receive-send-receive-... cycle continues, the first transmission will not trigger a receive interrupt, but starting from the second transmission, each transmission will trigger a receive interrupt. I looked at the chip manual and didn't see this mechanism. LIN itself should not have this mechanism, right?  Details Published on 2018-11-9 08:26
 
 
 

314

Posts

0

Resources
4
 
ienglgge posted on 2018-11-8 14:44 When polling is used to send data, the receive interrupt will also be triggered. Is there anything else connected to the pin? Check the program configuration to see if there is a self-initial...
A single transmission will not generate a receive interrupt. If the receive-send-receive-... cycle is repeated, the first transmission will not trigger a receive interrupt, but starting from the second transmission, each transmission will trigger a receive interrupt. I have read the chip manual and have not seen this mechanism. LIN itself should not be this mechanism, right?
This post is from TI Technology Forum

Comments

Check your program carefully. The serial port interrupt is a mechanism of the MCU, not generated by the LIN interface chip itself. As long as you enable the receive interrupt in the program, the LIN data output will naturally cause the MCU to generate a receive interrupt. Do not enable the receive interrupt when sending, but enable it when you need to receive.  Details Published on 2018-11-9 11:39
 
 
 

314

Posts

0

Resources
5
 
chunyang posted on 2018-11-6 21:13 If there is no independent transmit and receive control, and only one chip is enabled, then when the chip is enabled, because LIN is a single-wire bus, the transmit and receive are connected together internally, ...
A single transmission will not generate a receive interrupt, and if the receive-transmit-receive-... cycle is repeated, the first transmission will not trigger a receive interrupt, but from the second transmission onwards, each transmission will trigger a receive interrupt. I looked at the chip manual and didn't see this mechanism. LIN itself should not have this mechanism, right?
This post is from TI Technology Forum
 
 
 

1w

Posts

142

Resources
6
 
This post was last edited by chunyang on 2018-11-9 11:56
Posted by Magpie Prince on 2018-11-9 08:26 A single transmission will not generate a receive interrupt. If you cycle through receive-send-receive-..., the first transmission will not generate a receive interrupt, but the second transmission will...
You should check your program carefully. The serial port interrupt is a mechanism of the MCU, not generated by the LIN interface chip itself. As long as you enable the receive interrupt in your program, the data output given by LIN will naturally cause the MCU to generate a receive interrupt. Don't enable the receive when you are sending, but enable it when you need to receive. If you enable the receive first, you need to clear the receive flag in the serial port receive register before enabling the receive interrupt. This is the minimum process flow of serial port programming.
This post is from TI Technology Forum
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list