Questions tagged [samd21]

45 questions
10
votes
1 answer

SAMD21 MCUs: VDDANA in appears to be shorted to GNDA

I've been designing a custom circuit around the Microchip ATSAMD21E MCU. I thought my circuit design was fine until I soldered it all together and discovered a short between 3.3V and GND. (Needless to say, this caused the voltage regulator to get…
Joel Spolsky
  • 547
  • 1
  • 5
  • 17
4
votes
1 answer

Considering trying Atmel SAM and have some questions

I've been designing boards with STM32 chips for the last couple of years and my curiosity keeps saying that I should try something in the Atmel SAM line of chips. Most of the time, when someone asks about these chips the response seems to be "go…
Jeremy Gillick
  • 243
  • 2
  • 9
4
votes
2 answers

This ADC code works, but I don't understand why

I have the following code for reading a battery voltage on the ADC on a microcontroller (Atmel SAM D21 to be precise.) The reference voltage is 3.3V and the ADC is reading at 12 bit resolution: /** * Union for Readings * */ typedef union…
4
votes
2 answers

SAMD21 1μs timer handler taking longer than the timer period?

Before I begin I'd like to mention that I'm relatively new to working with microcontrollers at this low level, so please bear with me. I am trying to use an Adafruit Trinket M0 to process and generate signals to communicate over the Nintendo…
Jacob C
  • 41
  • 2
3
votes
1 answer

SPI on SAMD21G18 not working

I've been attempting to use SERCOM2 SPI Master on the SAMD21G18J but have been unsuccessful. I tried the configurations with SERCOM0 and SERCOM4, and they both worked. The most intriguing behavior is that when I initialize the SERCOM2 SPI, all of…
bmalbusca
  • 197
  • 6
3
votes
0 answers

New ATSAMD21 chip, flashed Bootloader OK, but USB Device doesn't show up

I'm trying to build my own custom PCB based on an ATSAMD21E chip. I made a PCB breakout for the ATSAMD21E that just supports the reset button, a 3.3V voltage regulator, and a couple of capacitors. After building the PCB with a fresh ATSAMD21E from…
Joel Spolsky
  • 547
  • 1
  • 5
  • 17
3
votes
2 answers

SAMD21 - How do I write to NVM fuses?

I'm trying to program the ATSAMD21G18 on Adafruit Feather M0 and over SWD Using a Segger J-Link EDU Nano. When I try to download the program to the chip through Atmel Studio it fails verification at address 0x000000. This result is explained by the…
chamod
  • 516
  • 8
  • 23
3
votes
3 answers

Combining a bootloader and user program into single flash-able binary

I want to flash the UF2 bootloader for SAMD21 MCUs together with a compiled binary of a user program onto a SAMD21 MCU. From what I understand how any bootloader works, the bootloader sits in a specific address space in the flash (in case of UF2 it…
timonsku
  • 1,368
  • 3
  • 14
  • 30
2
votes
1 answer

How do I read multiple ADC channels from a SAMD21 configured in atmel.start?

I'm stuck with trying to read multiple ADC channels on a SAMD21 that I have configured using ATMEL.start. I am very new to Microchip Studio (Arduino convert trying to upgrade). The below code is my basic "read the input voltage" function to test the…
2
votes
0 answers

Is it possible to use internal pullups on SAMD21 when pins are configured for SERCOM (SPI) mode?

According to the datasheet screen clip shown below, the internal pull up/dn configured in the PORT registers is still supposed to work even when the pin is configured for use by the SERCOM/SPI peripheral. When I step through the SERCOM SPI Slave…
crj11
  • 5,480
  • 1
  • 13
  • 32
2
votes
2 answers

SAMD21 SERCOM / UART problem: cannot enable RX and TX

I've been trying to set up a USART on an ATSAMD21E18A-MU and have been running into issues. Currently, I've narrowed the problem down to the fact that CTRLB.RXEN and CTRLB.TXEN never go high after enabling the USART. My hardware has TX on PA04 and…
jkiv
  • 182
  • 1
  • 1
  • 8
2
votes
0 answers

USB Audio device won't open in windows

I'm working on a simple USB audio input device based on the Microchip/Atmel ATSAMD21. The descriptors identify it as a single channel microphone with a single feature unit for volume control. As I understood the feedback endpoint is not mandatory so…
chamod
  • 516
  • 8
  • 23
2
votes
1 answer

ATSAMR21 sleep high current draw

I have an ATSAMR21B18-MZ210PA, which is an ATSAMR21E18 packaged with MX25L2006E flash. The SAMR21 is itself a SAMD21 paired with an AT86RF233 wireless module. So that's a SAMD21 + low power wireless + flash. The datasheets say I should expect ~4uA…
Matt Thomas
  • 255
  • 2
  • 9
2
votes
1 answer

SAMD21 DAC example

beginner here in need for starting directions. I have SAMD21 Xplained Pro Board. I would like to produce DC DAC output, based on 8 bits on the input. Range of my DC output values should be around 1V-5V (possibly a little different). For example,…
DenR
  • 131
  • 1
  • 9
1
vote
1 answer

Unable to lower current consumption below 500 µA in SAMD21 chip during deep sleep

I'm posting here as a last resort as I've read through the SAMD20 and SAMD21 datasheets, searched forums and used different deep sleep examples as references. My problem seems very similiar to what Matt Thomas was experiencing here: ATSAMR21 sleep…
1
2 3