Skip to content

hydronics2/samd21_QFP_reference_PCB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

samd21_QFP_reference_PCB

This is a reference design for a SAMD21 for easy SWD programming and testing. This layout should work with any SAMD21 QFP package. The QFP package is pretty easy to solder and gives you about the same amount of pins as the original Aruduino 328P. The following SAMD21 packages are QFP:

  • SAMD21E15 32kB of Flash **(read this)
  • SAMD21E16 64kB of flash **(read this)
  • SAMD21E17 128kB of flash
  • SAMD21E18 256kB of flash

I made a specific reference board for the SAMD21G posted here used in the Adafruit ItsyBitsy M0.

I wanted to start to try SWD programming and these are the less expensive version of the popular SAMD21G on Adafruit and Sparkfun boards. This PCB design relies heavily on Adafruit and Sparkfun reference design. I realized Adafruit has a similar design for their 32pin Trinket. They do not have a 32.768 crystal or a ferrite bead as recommended by Atmel. Not sure why/how that works. Instead of running the two pins PA00/PA01 to a crystal, they run them to their Dotstar LED!

You can order boards from Oshpark using this link: project

Here's a list of parts:

  • ATSAMD21E15B from digikey. Don't get the ATSAMD21E15L!... the pinout is slightly different.
  • generic 10 pin SWD Header from mouser
  • generic 5.08mm pitch screw headers (or 5mm)
  • FIXED IND 10UH 500MA 300 MOHM digikey
  • 3.3V Regulator (18V max input) mouser
  • T0-252-3 Mosfet (not needed) mouser
  • USB micro connector digikey
  • standard 6mmx6mm tactile button sparkfun
  • screw terminal 5mm pitch sparkfun or aliexpress
  • input protection diodes on the 12V and USB input into the regulator. This is Adafruit's design. digikey
  • 32.768khz crystal (if needed, see above trinket design) digikey
  • crystal capacitors C7/C8 based on a 7pf load from the above crystal and assumed 2pf stray capacitence, CX1 = CX2 = 2(7pF - 2pF) = 10pF digikey

SWD Programmer/Debugger: Segger

schematic

Notes:

  • add a ground plane
  • chagne the silkscreen to SAMD21E15
  • change the silkscreen C7/C8 from 15pf to 10pf

**READ THIS

The SAMD21E15 only has 32kb of flash. Fine for 8bit architecture but not for 32bit SAMD21 architecture!! About 50 lines of simple code uses 332 bytes (12%) in for the UNO but compiles over 9,000 bytes (9248 bytes (56%)) for the SAMD21E15, SAMD21E16, SAMD21E17, etc

That means that I should have gone with the SAMD21E17 or SAMD21E18 with 128 or 256kb respectively.

westf wrote this on the Arduino forum... That's not as bad as it sounds - a sketch has a fair about of "fixed overhead" (an empty Zero sketch is 10k.) So you're seeing THAT rather than some huge "50 lines of code bloats to 9k of code" multiplier for 32bit RISC. You should be able to fit a pretty significant sketch into the 10k you have left... But yeah, most ARM libraries (not just the Arduino code, BTW) pretty much assume that you'll have lots of memory, and don't bother being very inefficient. (adding a tiny bit of floating point will use up another 9k.) (and 8k for a bootloader? Sheesh!)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published