Why the value of the UART1_D register is different from the one I send with a terminal?

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

Why the value of the UART1_D register is different from the one I send with a terminal?

ソリューションへジャンプ
1,511件の閲覧回数
benjaminheder
Contributor III

Hello everyone,

First of all, I beg you pardon for my english level which is pretty catastrophic.

Then I'm using the FRDM-K66 and I'm working on the Uart reception.
In order to check the UART reception I send characters from a terminal to the board through a PL2303 cable wich allows serial communication.

Output pins of this cable are properly plugged into the good board pins for UART1 transmission (PTC3 and PTC4).

What I have already tried:

- I've already checked settings of the serial communication for the terminal and for the UART.

- I have also checked the value of the character sent with a scope.

- I've tried the SDK example entitled "driver_example_uart_polling". However the UART_D register value is the same than the character sent. It is the perfect proof that my code is wrong.

- In the UART_D register of my code there are no coherence between values. For instance if I send a "A", the value will be 0xbf. Then if I send a "B", the value will be 0xbf too. 0xbf is not even in ASCII table.

Any idea please?

Best regards,

Benjamin

0 件の賞賛
返信
1 解決策
1,392件の閲覧回数
benjaminheder
Contributor III

The problem came from the clock system.
BOARD_InitBootClocks(); was empty.
So after filling this function everything work perfectly.

Best regards,

Ben

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,393件の閲覧回数
benjaminheder
Contributor III

The problem came from the clock system.
BOARD_InitBootClocks(); was empty.
So after filling this function everything work perfectly.

Best regards,

Ben

0 件の賞賛
返信