Questions tagged [samd21]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

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 ...
0 votes
1 answer
37 views

Imprecise pulse width capture using Atmel SAMD51

We are using an ATSAMD51P19A and the Timer/Counter for Control Applications (TCC) to detect the pulse width from the assertion of a pin to the detection of a signal on another pin, and are having ...
2 votes
1 answer
128 views

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 ...
0 votes
1 answer
85 views

TCA9548A : power down while pull-up resistors are still supplied on one side

To keep RF as low as possible in a music synthesizer, I power down the SoC (XIAO SAMD21) which performs autotune once the autotuning procedure is completed. On one side of the TCA9548A there is the ...
0 votes
2 answers
101 views

How to get an ARM M0+ controller to retain it's last executed instruction after reboot?

I want to give my application a capability under which, in case of power off, the system retains last executed instruction and once the power is turned on again it RESUMES the program sequence. Is ...
0 votes
1 answer
170 views

Issues when trying to write to the internal flash of an SAMD21

I am writing to the internal flash of my SAMD21G18A microcontroller. I want to erase one row (4 pages), and manually write to one page just to understand the NVMCTRL abit more. this is the code FYI: <...
0 votes
1 answer
1k views

Control LEDs with 74HC595 shift register through SPI

I'm currently working on a project for which I need to control 16 white LEDs with two shift registers 74HC595 in cascade. I work on a ...
  • 11
1 vote
0 answers
234 views

Recovering read/write/debug access to SAMD21 board after accidentally overwritting SWDIO port config

I have a dev board for an ATSAMD21G18 (Seeed Studio Xiao) schematic here I just got an Atmel-ICE and started tinkering around with the SWD interface of the Xiao board (I'm new to embedded programming)....
  • 213
10 votes
1 answer
408 views

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 ...
3 votes
1 answer
85 views

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 ...
  • 177
0 votes
1 answer
225 views

Achieving low power with Seeeduino Cortex-M0+ powered from 12V battery

I hope it's OK to cross-post this question: https://arduino.stackexchange.com/questions/88618/achieving-low-power-with-arduino-zero-clone-seeeduino-cortex-m0. I'm getting a bit desperate. I have ...
0 votes
0 answers
108 views

How do I flash a bootloader onto a Cortex-M0 with hobby-priced hardware?

I was working on a schematic based around the ATmega32U4, but those are on backorder until 2023!! I was looking for alternatives and saw that a lot of Adafruit's hobby kits have switched from AVR to ...
1 vote
1 answer
59 views

How to connect JTAGICE3/Cortex Debug Connector to PC?

I am designign an custom PCB, that uses an ATSAMD21G18A-AU as the main Chip. Because it comes from the factory it needs a bootloader or another way to add software, so I need a JTAGICE3 connector or ...
  • 83
2 votes
0 answers
121 views

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. ...
1 vote
1 answer
142 views

ATSAMD21E18A - Atmel ICE programming error

Recently I have designed my custom PCB board, which includes a SAMD21E18A. Unfortunately, I am having trouble with programming. I am enclosing the schematic (please ignore the quality of the schematic,...
1 vote
0 answers
203 views

How to implement header files into my VScode embedded C project?

Sorry if this is a noobie question but I've been trying to get this set up for a few days and I'm still struggling. I haven't done embedded C in a couple of years and I'm trying to get back into it. I'...
  • 137
0 votes
1 answer
70 views

SAMD21E with Arduino : SPI

I created a custom board with a SAMD21E chip (thanks to this). I2C protocol works very well. Nevertheless, the SPI line from the Arduino Zero use PB pins which are not present on SAMD21E chip, so I ...
  • 5
0 votes
0 answers
272 views

How to program and then flash an ARM SAMD21 baremetal?

I want to make a simple program for a custom board with a SAMD21 core, without using any previously existing framework, like the arduino framework. The code to start with is just a simple main() with ...
0 votes
1 answer
230 views

How do I configure the ADC/DMA in Atmel start?

I am working on a project that requires the ADC, and I want to use the DMA.  I have been able to get the adc to work using the sync drivers (I haven't tried async), but when I use the DMA no ...
0 votes
1 answer
627 views

Very Noob Question: How to connect Seeeduino Xiao to CR2032 battery holder with switch?

I am planning on soldering together a seeeduino xiao along with an adafruit 20mm Coin Cell Breakout w/On-Off Switch for use in a portable trinket to inject code. Problem is, I've never really done ...
0 votes
2 answers
245 views

I2C design consideration for several slaves

In an application I have multiple I2C slave devices: display, RTC, and EEPROM. The most crititcal is the RTC, which needs to work 100%. I read that I2C freezes from time to time. At the moment all 3 ...
1 vote
0 answers
455 views

Problem SAMD21 : ASF4 USB CDC Echo example cdcdf_acm_write() doesn't allow to send data to usb port

I'm using the USB_CDC Echo Example for Atmel start, for ATSAMD21G18A. the code example runs Ok, but when I try to modify the code in order to send data "Hello World" in the infinity while ...
  • 11
1 vote
1 answer
341 views

Arduino MKR ADC maximum sampling rate

I know the Arduino ATmega-based boards’ maximum ADC sampling rate of an analog pin is 10 kHz, but what about the MKR family (SAMD21-based) boards? I couldn’t find any info about it.
  • 13
2 votes
1 answer
667 views

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 ...
2 votes
0 answers
464 views

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 ...
  • 5,440
4 votes
2 answers
2k views

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: ...
0 votes
1 answer
310 views

SAMD21 Xplained pro + Arduino IDE

How can I install board files into the Arduino IDE in order to upload my code to the ATSAMD21 Xplained Pro evaluation board. Can I know how can I do it? I Googled it but I didn't get any correct ...
  • 29
0 votes
0 answers
238 views

Can't upload to SAMD21 over SWD port. Tried Black Magic Probe and Atmel-ICE, Arduino IDE and PlatformIO

I must be missing something here. I’m unable to upload to a SAMD21 microcontroller with either a Black Magic Probe (v2.1) or Atmel-ICE. I have tried using both Arduino IDE and PlatformIO and haven’t ...
  • 1
2 votes
2 answers
585 views

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 ...
  • 172
2 votes
0 answers
163 views

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 ...
  • 516
0 votes
1 answer
165 views

Change the USB pins on SAMD21

I would like to use the pin mux in the SAMD21 mcu, to set different pins for the USB peripheral. The datasheet makes it sound like it is possible, but is very confusing. datasheet : https://cdn....
0 votes
0 answers
369 views

understanding bootloader with linker

I'm using chip SAMD21G18 SAM-BA bootloader Bossac code I'm looking at how bootloader works. but found some questions that i cant get an answer for: looking into source code of PC client software (...
0 votes
1 answer
158 views

SAMD21J18 abnormal boot

SAMD21J18 in a custom made circuit behaves abnormally as following: Delayed boot time between 2 to 5 seconds randomly Boots on touching the MCU crystal's metal top with a metal pin Boots on touching ...
  • 245
0 votes
1 answer
139 views

Generate unique IP/Mac from samd21 serial

We created 100 custom PCB around the samd21. And I'd like to generate some unique IP/Mac addresses from the Serial number of the samd21. In the datasheet they say the following Each device has a ...
0 votes
1 answer
762 views

Atmel SAMD21 DMA Transfer Complete Interrupt not firing

I have configured the SAMD21 peripherals so that incoming audio data from I2S will be copied into a memory buffer with DMA. As the controller allows linked DMA descriptors, I have two descriptors ...
  • 516
4 votes
2 answers
790 views

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 ...
0 votes
1 answer
340 views

ASF SAMD21G18 2x timers usage

im trying to use ASF to schedule repeated tasks. using TC4 and TC5: in atmel start both using generic clock generator 0 (48MHz). both are HAL:DRIVER:Timer driver init.c is generated automatically ...
3 votes
2 answers
3k views

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 ...
  • 516
1 vote
0 answers
2k views

Adapt existing usb-2 otg device to usb-c but use usb-2 mode

there are number of articles out there, like this one: http://www.ti.com/lit/wp/slly017/slly017.pdf But I'm not super confident in my abilities here so I'm wondering if someone could proof my ...
2 votes
1 answer
555 views

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 + ...
1 vote
1 answer
819 views

difference between CMSIS and ASF

im trying to make c++ project using atmel asf. the compiler have: ...
0 votes
1 answer
425 views

Intermittent NVM programming error

Occasionally I'll get the following errors while programming my SAMD21 chip. Anyone know the reason? ...
2 votes
1 answer
2k views

SAMD21 DAC example [closed]

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 ...
  • 121
-2 votes
1 answer
595 views

Using Adafruit Trinket M0 (SAMD21) as a USB to Serial converter

I wanted to know if it is possible to use SAMD21 as a USB to Serial converter like the usual FTDI chips ? If yes could you please point how to achieve that. I believe that Adafruit Trinket was used ...
  • 101
2 votes
3 answers
3k views

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 ...
  • 1,328