0
votes

Hopefully I will have more luck today. I have no prior USB integration and about 8 months of learning embedded systems on Atmel devices. I am trying to use an Atmel SAM L series to connect over USB to a computer. The use case is for data transfer. Specifically, the MCU will be gathering data from it's sensors and packaging it for USB transfer.

I have searched through and read up on all of Atmel's included USB examples. I have also started reading through usb.org's class specifications for CDC.

I have running now something that lets me send data along one com port, into the target usb and then out the debugger usb to another com port. However, I don't think this is real USB.

My problem is two fold.

1.) I do not fully understand what differentiates USB from serial communication on a com port.

2.) Even if I were doing it correctly, I'm not sure how to test and verify that I have indeed created a legitimate USB device that can be accepted by a host computer.

Links to documentation(Atmel or generic) or example code would be appreciated.

1
If you are not careful, you'll end up needing to writing a special device driver. Consider if you can fit your use case into something that can seem like a HID (Human Interface Device), because usually you can get to those with drivers usually already built in to operating systems. Go look at how hobbyists are implementing USB - infixed

1 Answers

0
votes

1) USB is defined in the USB specifications from http://www.usb.org. Serial ports were an older and simpler interface that involved sending data back and forth asynchonously on pins with names like TX and RX. The USB CDC class and its ACM subclass allow you to make a USB device that emulates a serial port. If you make your device be a USB CDC ACM device, then you don't need to supply any drivers for Windows 10, Linux, or Mac OS X.

2) You can read the USB specification and the CDC ACM specification. You can run the USB command verifier. You can test your device with a variety of different USB hosts to make sure it works.