KL05Z-FRDM debug through USB

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

KL05Z-FRDM debug through USB

跳至解决方案
674 次查看
kazola
Contributor III

Hi!

I do not even need for my current application but I'm just curious. I'm using ProcessorExpert in my project.

I'm using FreeMaster through the PTB1 and PTB2 pins (UART). I download and debug my code through openSDA in the USB port.

  1. I'm wondering if with this board is possible to use the USB connection for both the debugging sessions AND the puts() or printf() functions (console output) at the same time.
  2. If not, at least I would like to know if it is possible to use the USB-CDC connection for console output (no debugging) and this way I would have the physical uart at PTB1 and PTB2 free for connecting an external board.

I've not been able to do so following the great mcuOnEclipse tutorials :smileysad:

Let me know and have a nice weekend! :smileyhappy:

标签 (1)
标记 (4)
0 项奖励
1 解答
513 次查看
mjbcswitzerland
Specialist V

Hi Kazola

The KL05 has a single UART and it is connected to the OpenSDA's virtual COM port on PTB1 and PTB2. The UART can however be multiplexed to PTB3 and PTB4 as alternative.

If you set PTB3 + PTB4 as standard you can connect a physical connection for FreeMaster operation.

To send debug output to the virtual COM connection (shared with the debugger) you could temporarily divert the UART output to PTB1. Whie the debug output is being sent you can avoid responding to FreeMaster requests until the UART has been switched back to the FreeMaster UART - this will introduce a short delay that shouldn't disturb the FreeMaster protocol.

Regards

Mark

http://www.utasker.com/kinetis.html

在原帖中查看解决方案

0 项奖励
3 回复数
513 次查看
adriancano
NXP Employee
NXP Employee

Hi,

I agree with Mark, it is a good workaroud for your purposes.

Regarding the USB-CDC operation I'm afraid that is not possible in the FRDM-KL05 board. The USB connection (SDA_USBSHIELD) you see on the board is connected to the K20 device that is used for the OpenSDA interface.

usb sda kl05.png

A USB-CDC operation needs to be configured on the target device, in this case the KL05, but the KL0x family do not support USB module, therefore is not possible to set USB operation on it.


Hope this information can help you

Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
513 次查看
kazola
Contributor III

Thanks! :smileyhappy:

0 项奖励
514 次查看
mjbcswitzerland
Specialist V

Hi Kazola

The KL05 has a single UART and it is connected to the OpenSDA's virtual COM port on PTB1 and PTB2. The UART can however be multiplexed to PTB3 and PTB4 as alternative.

If you set PTB3 + PTB4 as standard you can connect a physical connection for FreeMaster operation.

To send debug output to the virtual COM connection (shared with the debugger) you could temporarily divert the UART output to PTB1. Whie the debug output is being sent you can avoid responding to FreeMaster requests until the UART has been switched back to the FreeMaster UART - this will introduce a short delay that shouldn't disturb the FreeMaster protocol.

Regards

Mark

http://www.utasker.com/kinetis.html

0 项奖励