UART communication

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART communication

716 Views
santhoshkumarsi
Contributor I

We want use UART for serial communication with GPS chip on KEA8 micro,Prot pins PTB0 and PTB1 are assigned for UART as ALT4,do we need to make any specific setting to use ALT4 functionality on port pins.

0 Kudos
2 Replies

608 Views
mjbcswitzerland
Specialist V

Hi

 

KEA8's UART0 is ALT2 on PTB port (not ALT4)

 

In the uTasker project this is set with:
_CONFIG_PERIPHERAL(B, 0, (PB_0_UART0_RX | UART_PULL_UPS));       // UART0_RX on PB0 (alt. function 2)
_CONFIG_PERIPHERAL(B, 1, (PB_1_UART0_TX | UART_PULL_UPS));       // UART0_TX on PB1 (alt. function 2)

 


To use the alternative pins on port A instead this would have to be selected with
SIM_PINSEL0 |= (SIM_PINSEL_UART0PS);
and then the pins with

 

_CONFIG_PERIPHERAL(A, 2, (PA_2_UART0_RX | UART_PULL_UPS));       // UART0_RX on PA2 (alt. function 2)
_CONFIG_PERIPHERAL(A, 3, (PA_3_UART0_TX | UART_PULL_UPS));       // UART0_TX on PA3 (alt. function 2)

 

Simulation below showing the Rx pin function being checked.

 

Regards

 

Mark

 

 

pastedImage_4.png

Kinetis: http://www.utasker.com/kinetis.html
Kinetis KEA8:
- http://www.utasker.com/kinetis/TRK-KEA8.html
S32 Design Studio: http://www.utasker.com/kinetis/compilers.html#S32

Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html

0 Kudos

608 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi santhoshkumar siripuram,

    I don't know why you say the KEA8 PTB0 and PTB1 are assigned for UART as ALT4, from the KEA8 reference manual:

https://www.nxp.com/docs/en/reference-manual/KEA8RM.pdf 

 page 134,

pastedImage_2.png

You can find the PTB1 and PTB0 ALT2 is the UART0 pin.

You don't need to configure the ALT, if you enable the UART, but didn't enable the higher priority module in this pin(AL3,ALT4,ALT6 module), the PTB1 and PTB0 will default in the UART function after you enable the UART0 module.

About the UART0_TX and UART0_RX detail, it is configured in register SIM_PINSEL[UART0PS],

pastedImage_3.png

in default, UART0 pin are mapped on PTB0 an PTB1.

Wish it helps you!

If you still have question about it, please kindly let me know!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos