LPUART Transmitter Active Soon as Enabled

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPUART Transmitter Active Soon as Enabled

跳至解决方案
1,395 次查看
Mike_d
Contributor IV

Hi,

I trying to figure out why the TC status shows it as sending data the line after the transmitter is enabled and never goes idle.

Regards,

-Mike

0 项奖励
回复
1 解答
1,214 次查看
Mike_d
Contributor IV

Found it.  I didn't have the PLL selected.

SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL(1);

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,215 次查看
Mike_d
Contributor IV

Found it.  I didn't have the PLL selected.

SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL(1);

0 项奖励
回复
1,214 次查看
Mike_d
Contributor IV

So which is correct?  My problem is the TC bit is always 0.

pastedImage_2.png

pastedImage_3.png

0 项奖励
回复
1,214 次查看
mjbcswitzerland
Specialist V

Mike

pastedImage_1.png

The default for this flag is to be set, meaning that it will interrupt immediately when the UART is enabled if its interrupt mask is set.
It only goes to '0' while transmission is taking place and is set back to '1' (can generate interrupt) when the transmission terminates (idle-line again).
This is the same behavior as the TDRE flag apart from the fact that the TDRE goes high again when the data has been shifted out rather than after the last bit period has terminated.

Regards

Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html

0 项奖励
回复