Author Topic: Programming SAMD21 by SWD: pin question  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Programming SAMD21 by SWD: pin question
« on: August 27, 2018, 05:40:55 am »
Hello, I'm trying to design a PCB with the SAMD21 to be programmable by SWD and have a question about the pin connections for the programmer. The datasheet lists several connections, including SWDCLK, SWDIO, RESET, GND, and VTG.

The MCU gets power from a buck converter embedded in another chip, so I have two voltages in the system: about 12V, and 3.3V from the buck converter that feeds the SAMD21. So I'm guessing I should connect VTG to the 3.3V, not the 12V, but wanted to make sure that's right.

Please let me know if my assumption is correct.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11238
  • Country: us
    • Personal site
Re: Programming SAMD21 by SWD: pin question
« Reply #1 on: August 27, 2018, 06:15:27 am »
Yes, this is correct. You should never have more than 3.3V on any of the programming pins.
Alex
 
The following users thanked this post: anvoice

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Programming SAMD21 by SWD: pin question
« Reply #2 on: August 27, 2018, 07:02:09 am »
Thanks, good to know.

On a related note, I notice that it's said that on the version I'm using (SAMD21E), only pins PA08/PA09, PA16/PA17, and P22/PA23 support Hs (High-speed?) I2C mode. I was hoping to use the same pins for SWD and I2C control of the chip during normal operation, but that looks to be unattainable. However, I don't understand why pins PA00/PA01 can't be used for the same I2C mode as the rest of those listed, since they also map to pads 0 and 1 on Sercom1? Is it indeed the case that I must use one of the listed three pairs, or can I somehow make use of PA00 and PA01?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11238
  • Country: us
    • Personal site
Re: Programming SAMD21 by SWD: pin question
« Reply #3 on: August 27, 2018, 07:57:14 am »
Pins specifically marked as I2C HS compatible have pads with high drive strength. It only matters if you use I2C above 400 kHz. For normal use, you can use any pins with I2C SERCOM pads.
Alex
 
The following users thanked this post: anvoice


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf