How to change the UART used by kboot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to change the UART used by kboot

799 次查看
lalvarez
Contributor I

Hi, I am using the FRDM64K and KBOOTv12.
How I can change the UART used for kboot?
I want to use the UART 3 PTC16 and PTC17 pins.
What I have to modify it to work? hardware_init_MK64F12.c?

0 项奖励
回复
2 回复数

632 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Luis,

The instance of the UART can be changed by modifying the .instance member in the g_peripherals[] table found on the peripherals_<device>.c file. Once the desired instance has been selected you need to tell the bootloader which pins to use for each peripheral, this is handled in the hardware_init_<device>.c file.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

632 次查看
mjbcswitzerland
Specialist V

Hi Luis

In case of difficulties the uTasker serial loader, with KBOOT compatible UART, can be used with any UARTs and mux-settings. To set the KBOOT UART to UART3 and the pins PTC16 and PTC17 the following two settings can be used:

#define LOADER_UART     3
#define UART3_ON_C                                               // alternative UART3 pin mapping

From what I see in the Kboot source, UART 0 and 1 are supported (based on TWR and FRDM boards) but the others are not.

I think that you will need to extend uart_pinmux_config() and adjust the UART instance used - however I am not sure how this is best done and there may be some complications due to the fact that UART 3 is clocked differently from UARTs 0 and 1.

Regards

Mark

Kinetis: µTasker Kinetis support

K64: µTasker Kinetis FRDM-K64F support  / µTasker Kinetis TWR-K64F120M support  / µTasker Kinetis TWR-K65F180M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 项奖励
回复