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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
472 Views
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 Kudos
1 Solution
353 Views
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

View solution in original post

0 Kudos
1 Reply
354 Views
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 Kudos