OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3202|回复: 3

RT1052 无法清除串口 状态寄存器 的发送完成标志位(TC)

[复制链接]

4

主题

12

帖子

0

精华

新手入门

积分
15
金钱
15
注册时间
2018-11-8
在线时间
3 小时
发表于 2018-12-7 16:00:26 | 显示全部楼层 |阅读模式
1金钱
现附上相关标志位信息,试过,好像不可以直接往STAT写0来清除TC位,提供的另外两种方法可以清除但是会影响后面的发送。
Transmission Complete Flag
TC is cleared when there is a transmission in progress or when a preamble or break character is loaded.
TC is set when the transmit buffer is empty and no data, preamble, or break character is being
transmitted. When TC is set, the transmit data output signal becomes idle (logic 1). TC is cleared by
writing to LPUART_DATA to transmit new data, queuing a preamble by clearing and then setting
LPUART_CTRL[TE], queuing a break character by writing 1 to LPUART_CTRL[SBK].
0b - Transmitter active (sending data, a preamble, or a break).
1b - Transmitter idle (transmission activity complete).



Transmitter Enable
Enables the LPUART transmitter. TE can also be used to queue an idle preamble by clearing and then
setting TE. When TE is cleared, this register bit will read as 1 until the transmitter has completed the
current character and the TXD pin is tristated.
A single idle character can also be queued by writing to the transmit FIFO with DATA[FRETSC] set and
DATA[R9T9] set.
0b - Transmitter disabled.
1b - Transmitter enabled.


Send Break
Enables the LPUART transmitter. TE can also be used to queue an idle preamble by clearing and then
setting TE. When TE is cleared, this register bit will read as 1 until the transmitter has completed the
current character and the TXD pin is tristated.
A single idle character can also be queued by writing to the transmit FIFO with DATA[FRETSC] set and
DATA[R9T9] set.
0b - Transmitter disabled.
1b - Transmitter enabled.

最佳答案

查看完整内容[请看2#楼]

我自己回答了 谢谢 感觉RT1052这点做的太不合理了 发送完成标志位 竟然不光在发送完成时置 1 还会发送寄存器空的时候置 1 那请问还要发送数据寄存器空标志位 干嘛??!!
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

4

主题

12

帖子

0

精华

新手入门

积分
15
金钱
15
注册时间
2018-11-8
在线时间
3 小时
 楼主| 发表于 2018-12-7 16:00:27 | 显示全部楼层
我自己回答了  谢谢  感觉RT1052这点做的太不合理了  发送完成标志位 竟然不光在发送完成时置 1   还会发送寄存器空的时候置 1  那请问还要发送数据寄存器空标志位  干嘛??!!
回复

使用道具 举报

4

主题

12

帖子

0

精华

新手入门

积分
15
金钱
15
注册时间
2018-11-8
在线时间
3 小时
 楼主| 发表于 2018-12-7 16:24:38 | 显示全部楼层
#在这里快速回Some flags can only clear or set by the hardware itself, these flags are: kLPUART_TxDataRegEmptyFlag,复#
回复

使用道具 举报

4

主题

12

帖子

0

精华

新手入门

积分
15
金钱
15
注册时间
2018-11-8
在线时间
3 小时
 楼主| 发表于 2018-12-7 16:25:47 | 显示全部楼层
Some flags can only clear or set by the hardware itself, these flags are: kLPUART_TxDataRegEmptyFlag,
        kLPUART_TransmissionCompleteFlag, kLPUART_RxDataRegFullFlag, kLPUART_RxActiveFlag,
        kLPUART_NoiseErrorInRxDataRegFlag, kLPUART_ParityErrorInRxDataRegFlag,
        kLPUART_TxFifoEmptyFlag, kLPUART_RxFifoEmptyFlag.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-5-29 09:52

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表