SAMD21J1A USB connection interface

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

Hi All

 

I am not sure if this should go on the general electronic, but choose to post it here as it related to the SAM device and USB.

 

I would like to connect my SAM device to the GSM module(BG 95/95) using USB purply for a higher data rate compared to UART.

 

But i would also like to connect a PC, so I can communicate to both SAM and BG95.

 

I would like three types of communication in terms of priority.

 

1. SAM To BG96 -- Standard firmware operation

2. PC to BG96- For GSM firmware and logging debug operations.

3. PC to SAM - Not necessary at the moment, but could be used for firmware update for SAM, OTA is also possible if this USB link can not work.

 

Can this be set up?

 

Does SAM require additional components when using USB?

 

 

Regards

 

DJ

 

 

 

 

 

 

 

 

 

Thanks

Regards

DJ

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

djoshi wrote:
GSM module(BG 95/95) using USB purply for a higher data rate compared to UART.

Those are both LPWA modules -  Cat M1/Cat NB2/EGPRS - so they are not going to give you "high" data rates!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know the data rates are low, on these devices, but can still work with USB.

 

What I did not mention in the original post is, the Quectel has a compatible module called the EG-9x, which I am to order in the new year. This module can communicated at data rate of up to 50Mbs if remember correctly.

 

What I aim to do is, get the USB working between BG-95 and SAM, once I see it working even at low data rate, then replace BG-95 with a EG-9x.

 

 

 

 

 

 

 

Thanks

Regards

DJ

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


 

Check the Quectel documentation for what USB Class(es) it supports, but it will almost certainly be CDC/ACM - the Communication Device Class (with Abstract Control Model)

 

So you'll (almost certainly) need to be searching for CDC/ACM examples ...

 

ADDENDUM

 

A quick google for "samd21 usb cdc example" gives:

 

https://asf.microchip.com/docs/latest/saml21/html/uhi_cdc_quickstart.html

 

Also, on the Product Page:

 

See: https://www.avrfreaks.net/commen...

And: https://www.avrfreaks.net/commen...

 

And don't forget the Schematic Checklist section in the Data Sheet:

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Jan 1, 2022 - 11:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Happy New Year

 

Thank You for your message, I will look in more depth into these classes. 

Thanks

Regards

DJ