How using Q2686 / 87 USB Port for debugging application


#1

Hi everybody,

My application use both UART 1 & 2 in data mode and a specific interface is linked to each UART.
So, i would like to use USB link to debug with Visual C++ / Terminal Emulator / Target Monitoring Tools my application.

So, i have openned USB link (AT+WMFM=0,1,3), and settings the “RemoteTask monitor” (when starting debug mode) for using USB link .

But, nothing happened under TMT and TE ! So, how configuring Target Monitoring Tools and Terminal Emulator for seiing TRACE coming from USB link ?

Thanks in advance for your help.

Regards


#2

There is an issue with how your PC communicates to the Wavecom module via the USB port.

First close the USB interface: at+wmfm=0,0,1
then reopen it: at+wmfm=0,1,3

Then go to your computers device driver window. Under Modems, you will find “Wavecom USB Wireless CPU”.
Select it, and then look at it’s properties. Under the Modem tab, you will find what vertual COM port the wavecom module is using. You can then open a hyperterminal to that COM port and issue most AT commands.

I would suggest that if your going to be doing this, that you first create a menu of options with your own AT commands, also I would suggest that you issue the USB activate command within your Open AT application so you will not have to continue to open/close the port:
ie: adl_atCmdCreate(“AT+WMFM=0,1,3”,FALSE,NULL,NULL);

Another note: every time you re-start your wavecom module the vertual COM port will also be reset and your PC will loose the USB connection. So to continue debug operations via the USB port, you must close your terminal connection before restart the Wavecom module.


#3

Hello ,

I want to use the USB for debug ( send trace ) but no thing hapen when i start a debug .

Thank you for you help

Regards


#4

You must “create” your owm traces, for example using adl_atSendResponse on USB. You would recieve the information as text on a hyperterminal or similar.


#5

No, that’s not true.

The TRACE macro (and DUMP, ETC) are not tied to a particular interface - they are enabled at runtime by whichever interface (UART1, UART2, USB, whatever) is connected to the TMT (or M2MStudio).


#6

Hi awneil,
How do you for the TRACES over the USB? Do you generate the code as Target-Debug or as Remote-Debug? I hope that Remote-Debug doesn’t work over USB but I’ve never tried it.


#7

As I said, the TRACE macro is not tied to any particular interface - so USB is irrelevant here!


#8

Hello ,

but i tried with usb interface and i have no trace in debug mode .
how i do this ( i want TRACE with USB interface ) .

Regards


#9

What, exactly, did you try?

Describe the complete, step-by-step, procedure that you used.

Can you get TRACE on UART1 or UART2 :question:


#10

ok , in my application i want to use UART1 and UART2 to communicate with 2 devices , and use USB for debug ( send TRACE )it this possible , if Yes how i can do this ( Send TRACE with USB interface ).

Thank you !

Regards


#11

Yes, but you need to do first things first!

If you can’t even get trace on UART1, then you have a fundamental problem that is nothing to do with USB!

So, start with a simple test app to verify that you can get trace on UART1.

Then try it on USB…


#12

First, try to read TRACES over UART1 on Remote-Debug mode. Does it works? If not, the problem should be in TRACES reading on tools. If it works, I hope awneil will explain us how to read the traces on USB. :smiley:


#13

Yes , I get TRACE from UART1 and UART2 but not USB.
Procedure to get TRACE from USB :
1- I open the Virtual port for USB ( COM11 for me) .
2- when i run debug , in setting , i select in Hard communication Type: USB and COM11 for COM Number for USB and i click START .
I think that the PC lose the commnication with the USB interface when i start the debug !!! .

Thank you !


#14

The PC loses the USB connection whenever the module restarts:
viewtopic.php?f=5&t=3077&p=11348&hilit=usb+debugging#p11348
viewtopic.php?f=5&t=2978&p=10909&hilit=usb+restart#p10909


#15

So , it’s imposible to send TRACE with USB Interface !?


#16

Not impossible - but inconvenient.

Have you tried looping the debug through the PC?


#17

I tried to close and open the USB port but i have no TRACE too .
You can explain to me how i get TRACE from USB ( the procedure please ) .

Thank you !


#18

For your solution , i must use the release Mode , but the debug mode .


#19

You would have to wait for the device to restart, and wait for Windows to re-enumerate the USB.

Once the USB is connected & working again in Windows, open TMT.

You should now be able to get traces over USB in the same way that you get traces over the UARTs…


#20

I do not know how you do it but for me not work always . :frowning: