Can NOT write in UART0 data register D

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

Can NOT write in UART0 data register D

1,564 次查看
muhammedhafez98
Contributor I

While trying to send data byte through UART0, an by writing this data byte to D register, the content of data register D doesn't change and always has a zero value 0x00. What is the problem here? There are a snapshots show that. Also TC and TDRE always set to 1. 

pp3.PNGpp3.1.PNG

标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

1,500 次查看
Sabina_Bruce
NXP Employee
NXP Employee

In addition, if you'd like to be able to better manage those values. You can create a buffer, that stores the values being read from this register.

Then compare your buffers to confirm if the data is being written correctly.

Best Regards,

Sabina

0 项奖励
回复

1,500 次查看
mjbcswitzerland
Specialist V

Hi

The data register is used to write data to that is to be sent and read data that is received. That is, unless you have a loop-back where the data your send is received, you won't see the value that was written (you will see the last data that was received).

You should however see the written data being sent out on the Tx pin.

Regards

Mark
(uTasker project developer for Kinetis and i.MX RT)

0 项奖励
回复