Disconnecting Seggar J-Link after debugging

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disconnecting Seggar J-Link after debugging

820 Views
raduansarif
Contributor I

Hello, I am using MKL27Z MCU and MCUXPresso IDE at windows 10, for debugging using Seggar J-Link Edu and power supply using USB c. Now I want to disconnect the Seggar J-Link Edu after the debugging. Then want to transfer output data through USB c in the semihost console. How can I transfer the output data without using Seggar J-Link, by using USB? Thank you.

 

With Regards 

Raduan Sarif

0 Kudos
6 Replies

816 Views
ErichStyger
Senior Contributor V

If you want to use semihosting, you need to be aware that this requires an active debug connection and with this a debug probe (like Segger). If you want to use something else, then you can use UART (and UART-2-USB adapter) or just use USB CDC natively: but for this you need to run the USB stack on the KL27Z.

I hope this helps,

Erich

0 Kudos

804 Views
raduansarif
Contributor I

Hello, Thank you for your reply.

As I am a beginner in this area, I have no idea how to run the USB stack on the KL27Z. Can you please help me with USB stack on the KL27Z?  any guidelines, links or documents, or tutorials.  

0 Kudos

795 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi raduansarif,

You can refer the USB examples in SDK:

dev_cdc_vcom_bm.png

Best Regards,
Robin

0 Kudos

773 Views
raduansarif
Contributor I

Thank you for your reply.

I was trying with this example. But my main goal is to print I2C sensor data in UART terminal by using USB. How can I use this example to print (I2C board2board polling example) in the UART terminal?

As I can print the I2C data in the Semihosting by using debug probe (Jlink Edu ) and using USB power supply. For the experiment purpose, want to remove the debug probe (Jlink Edu ) and use the USB both for the power supply and data interface.

How can I use only a USB for both power supply and data transfer?

MCU: MKL27Z128LH4, MCUxpresso IDE, Windows 10, I2C communication.

 

 

Thank you

Raduan

0 Kudos

754 Views
bobpaddock
Senior Contributor III

What about the CDC VCOM example is not working?
That is the USB UART equivalent.

It is up to your application to translate the I2C data to the CDC message to get it sent out USB, just as it is up to the application to translate I2C to the semi host console.

 

0 Kudos

764 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Raduan,

Please show us the schematic of your custom board. Does the circuit of your custom board same as FRDM-KL27Z or the "33.1.3.3 USB bus power supply"?

33.1.3.3 USB bus power supply.png
If your custom board same as FRDM-KL27Z, then you just need to switch from semihosting to UART, please refer: MCUXpresso IDE and Semihosting.
If you don't want to output the data through UART(using externa UART-2-USB adapter), only want to data output through USB0_DP and USB0_DM then you may need to migrate the I2C example to USBCDC example.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos