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.
Thanks in Advance.
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
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