Can NOT write in UART0 data register D

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can NOT write in UART0 data register D

1,341件の閲覧回数
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,277件の閲覧回数
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,277件の閲覧回数
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 件の賞賛
返信