2011-06-28 07:48 AM
Hello everybody,
I'm using STM32F103ZEH6. The device is connected to a host pc via USB emulating a virtual COM port. From time to time I can detect 2 similar packages with my USB-Sniffer an the host pc recognizes them, too. But I do send this package only once! Does anybody have an idea why this is happening? It seems not to be a problem with USB protocol. The USB-Sniffer does not detect any errors. Thanks for your help! bgl #usb-com #virtual-com-port2011-07-05 12:26 AM
Can you provide the USB trace??
2011-07-05 08:09 AM
Hi Pila,
I attached an excerpt of the trace. Lines starting with ''//'' provide comments from myself. bgl ________________ Attachments : UsbBug.pkt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Jv&d=%2Fa%2F0X0000000blI%2FR2TwiI99wExRJaVG4KApQDR09TSxvmeXZKGnu8KpM_o&asPdf=false2011-07-06 01:01 AM
so which data pkt you are talking abt??? ''69 81 58'' ???
2011-07-06 01:20 AM
I'm talking about the lines 78 to 92. There You can see that two identical Data packages are sent to the host. They differ only in DATA0/DATA1 identifier.
I'm transfering these data to the endpoint buffer only once.2011-07-06 02:30 AM
Plz check if the state machine is updated properly.
I mean after sending data for the first time is the state updated??2011-07-07 05:58 AM
Are you using the Virtual Comm port example provided in USB-Library ? or You have developed your own firmware ?
2011-07-07 09:19 AM
Hi!
Thanks Pila for pointing me to the right direction. Although the states were updated correctly I could detect a race condition between the write counter and the IRQ. This error must have been built in while customizing the source code. I checked the virtual com port example and think it is correct. Thanks for Your Help! bgl2011-07-08 01:40 AM
thats good..