Help setting up example FreeRTOS UART project - FRDM-KL64Z

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

Help setting up example FreeRTOS UART project - FRDM-KL64Z

1,329 次查看
p17085
Contributor I

Hello everyone,

I want to load up the FreeRTOS UART example for the FRDM-KL64Z board, but I can't get it to work. I import the example project and I open Pin config tool to let MCUXpresso initialize the pins needed for the project. I get a small warning that the UART1 peripheral isn't initialized, so I let MCUXpresso initialize it for me, but when I try to debug I don't see anything printed on my terminal. What could be the problem?

I've tried running some other example projects that worked with printf redirected to uart, so I know that my terminal at least is configured correctly.

0 项奖励
8 回复数

1,298 次查看
p17085
Contributor I

-

0 项奖励

1,314 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @p17085 :

 

If you are using Frdm-k64F board,   the uart 1 is used for OPENSDA debug purpose by default. You need to use another uart.

 

Regards

Daniel

 

0 项奖励

1,318 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

We don't have a FRDM-KL64Z board, do you mean Frdm-kl46z?

For Frdm-kl46z board, I imported the freertos_uart demo,   the default setting, I can see UART1 is initialized correctly.

 

danielchen_0-1606117021419.png

 

There is a readme file in the installation dem folder. Please refer to it for more details.

 

Regards

Daniel

0 项奖励

1,295 次查看
p17085
Contributor I

Hello,

Yes, I meant Frdm-kl46z. I run the debugger again and I can see that uart is initialized indeed, just like in your screenshot. If so, why do I not see anything printed on my terminal, like the readme says should happen? I'm sure my terminal is configured correctly, as I've been able to see it work with other examples that simply use uart as a debug console.

0 项奖励

1,256 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

In order to run freertos_demo with FRDM-KL46Z, we need a USB to Com convert.

Board settings:

==============
USB2COM UART1
Pin Name Pin Name Board Location
RX PTE0 J2 pin 18
TX PTE1 J2 pin 20
GND GND J2 pin 14

 

Regards

Daniel

0 项奖励

1,228 次查看
p17085
Contributor I

Hello,

I don't quite understand, what is this usb to com convert? Is it some sort of peripheral and if so, how can I set it up?

0 项奖励

1,199 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

I am consuming you don't have a RS232 COM ports on your computer.   (some older computers have)

https://www.amazon.com/TRENDnet-Converter-Installation-Universal-TU-S9/dp/B0007T27H8

 

https://www.youtube.com/watch?v=vzCNfBux1h0

 

If you have COM ports in your computer, you can use it directly , not need usb to COM converter.

 

Regards

Daniel

0 项奖励

1,186 次查看
p17085
Contributor I

Hello,

Considering that I don't have such cable available right now, is there a way for me to use uart1 (the one used by the example project) via a usb port, or should I use a completely different uart, like uart0?

0 项奖励