USB debug messages MTQ-H5-B01
- This topic has 8 replies, 2 voices, and was last updated 8 years, 7 months ago by Will Blight.
-
AuthorPosts
-
April 18, 2016 at 3:59 pm #12183Will BlightParticipant
I have been using the MTUDK-ST-Cell development kit to write and debug my app. I have the M4 processor app written and the dragonfly board attached to our sensor. I would like to get debug messages from the dragonfly on board USB to my PC.
When I plug my USB cable into the dragonfly USB Port windows creates 5 USB comports but after a short period of time they all disappear from device manager even if I have them open.
Is there a way to do this?April 18, 2016 at 4:27 pm #12184Mike FioreBlockedWill,
The USB port on the Dragonfly itself bypasses the processor and gives you a direct connection to the radio. The debug messages come out of the USB port from the UDK2 board (connector J6) – the same port you connect to flash a new program on the Dragonfly.
When you connect that USB port, you should see a new COM port appear. This is the USB debug port – where you will see debug messages from the Dragonfly.
Make sure you configure your terminal program to match the baud rate of the Dragonfly. It is 9600 by default but your application can change it if you wish.
Cheers,
Mike
April 19, 2016 at 9:05 am #12188Will BlightParticipantHi Mike,
Thanks for the message. I have been using the J6 connector on the UDK2 board.The MTQ-H5 device guide Page 18, note section says:
“The USB port can switch between a connection to the radio or a connection to the processor. The USB selection is controlled via programming on the processor.”
There is a diagram showing the USB port connecting to the M4 and the Radio (same page).I am wondering how to do this, programmatically control the USB connection? Do I use A10?
The table starting on Page 15, shows STMicro pins and how the MTQ uses them.
Pin 43 (A10) is described as “USB Switch control, 0=Telit, 1=STM”.Will.
April 19, 2016 at 9:57 am #12189Mike FioreBlockedWill,
You are correct that the USB port on the Dragonfly itself can be connected to either the radio or the processor. And yes, pin A10 controls the USB switch as the documentation states.
However, please note that the USB port on the Dragonfly itself if not the port debug messages come from. Like I said in my last post, you need to connect the J6 USB connector on the UDK board to your PC in order to get debug messages from the processor. A COM port should enumerate, and that is where the debug messages will be (printf calls from your program, etc).
You may have to do some work to use the USB on the Dragonfly’s processor. I don’t think mbed has full USB support for the STM32F411.
Cheers,
Mike
April 19, 2016 at 12:19 pm #12194Will BlightParticipantHi Mike,
I was not communicating very well. I meant I want to send messages out the USB port so I could debug my app. I understand that the “debug messages” as provided in the example code use a specific port.
I checked the M4 documentation and it does support full OTG USB support but requires a dedicated 48MHz which the dragonfly board doesn’t have. So I am giving up on the USB port. It would have been a great option for configuring operational parameters.April 19, 2016 at 12:53 pm #12195Mike FioreBlockedWill,
Is there a reason you can’t use the USB debug port that’s already provided for your additional configuration requirements? That port provides stdio for your Dragonfly.
Cheers,
Mike
April 19, 2016 at 4:46 pm #12208Will BlightParticipantHi Mike,
The dragonfly is attached to a sensor through the 40 pin connector. I could connect the sensor to the UDK2 and power the UDK2 board but I do not have a breakout cable.April 19, 2016 at 4:59 pm #12209Mike FioreBlockedI see. Didn’t realize you weren’t using a UDK. The serial debug port also comes out the 40 pin connector, so if you have a TTL to USB cable or something similar, you could wire that up to get your debug output.
-Mike
April 20, 2016 at 1:42 pm #12226Will BlightParticipantI also wanted to use the USB port on the dragonfly to configure the unit in our production department when the dragonfly is enclosed in the sensor housing.
We have lots options for the future. Thanks for the suggestion about the TTL to USB. -
AuthorPosts
- You must be logged in to reply to this topic.