USB CDC using ASF on SAM3X

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

 

I have recently a weird problem using the USB connection. I use the ASF USB CDC and everything works fine receiving data and printing them using printf.

 

Whenever the computer is booted at the same time as the controller device, the connection is somehow out of sync, and only data which is sent using printf without any placeholders (like %i and the like) is then appears, while for the printf commands which contain placeholders appear only as a newline command (0x0A).

Even after extensive searching and reading a lot about USB communication events, I still have no idea where this comes from. Any ideas or suggestions?

 

Best regards,

 

as3.1415rin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Part of the problem seem to have been the DTR line. I now monitor the DTR callback function and now it works better.

 

However,now the problem remains once I restart a computer and then reconnect via USB to the virtual COM port. Then again only 0x0a characters are received, at the frequency the data lines should be coming in.

 

Somehow I need to reinitialize somewhere the USB communication as it seems, but the question is when, and where. Resetting the controller once the connected computer is up and running always solves the problem, but this is not the idea.

 

Any suggestions? I'm running out of ideas.

 

Edit: The Host computer is a Win10 machine using the in-built usbser.sys driver on that port.

Last Edited: Wed. Jan 3, 2018 - 04:00 PM