KL05Z-FRDM debug through USB

cancel
Showing results for 
Search instead for 
Did you mean: 

KL05Z-FRDM debug through USB

Jump to solution
297 Views
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:

Labels (1)
0 Kudos
1 Solution
136 Views
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

View solution in original post

0 Kudos
3 Replies
136 Views
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 Kudos
136 Views
kazola
Contributor III

Thanks! :smileyhappy:

0 Kudos
137 Views
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

View solution in original post

0 Kudos