Skip to main content

Questions tagged [samd21]

The tag has no usage guidance.

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

I2C on SAMD21 with Atmel Start works only in one direction

I am trying to establish a half-duplex I2C communication between two ATSAMD21G18A microcontrollers, using Atmel Start's I2C functionality. (HAL Synchronised I2C) The automatically generated example ...
aulven's user avatar
  • 117
4 votes
0 answers
75 views

Erratic and confusing I2C behavior between ATSAMD21G18 and A89307 through ISO1644 isolator

I'm working on a BLDC driver using Allegro's A89307 controlled by an isolated ATSAMD21G18 via TI's ISO1644 I2C digital isolator. The simplified I2C connection is shown below, I omitted all the bypass ...
Jess S.'s user avatar
  • 41
1 vote
1 answer
254 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 ...
Praktikanten's user avatar
0 votes
1 answer
60 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 ...
amasmiller's user avatar
2 votes
1 answer
541 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 ...
IlluminatedDan's user avatar
0 votes
1 answer
93 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 ...
Synthlink's user avatar
0 votes
2 answers
143 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 ...
Pritesh gupta's user avatar
0 votes
2 answers
585 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: <...
Embedded_Dude's user avatar
0 votes
1 answer
3k 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 ...
Fanch's user avatar
  • 11
1 vote
0 answers
508 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)....
topher217's user avatar
  • 223
10 votes
1 answer
540 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 ...
Joel Spolsky's user avatar
3 votes
1 answer
201 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 ...
bmalbusca's user avatar
  • 197
0 votes
1 answer
312 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 ...
Paul Jurczak's user avatar
0 votes
0 answers
145 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 ...
D. Patrick's user avatar
1 vote
1 answer
83 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 ...
Bugsia's user avatar
  • 83
3 votes
0 answers
213 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. ...
Joel Spolsky's user avatar
1 vote
1 answer
321 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,...
Tomáš Havel's user avatar
1 vote
0 answers
261 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'...
MendelumS's user avatar
  • 157
0 votes
1 answer
92 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 ...
Artex's user avatar
  • 5
0 votes
0 answers
592 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 ...
hf98a6r7fayh's user avatar
0 votes
1 answer
413 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 ...
Eric Busch's user avatar
0 votes
1 answer
1k 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 ...
Ocelot124286's user avatar
0 votes
2 answers
352 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 ...
user3435167's user avatar
1 vote
0 answers
616 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 ...
isfan's user avatar
  • 11
1 vote
1 answer
745 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.
Wxy's user avatar
  • 13
4 votes
1 answer
1k 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 ...
Jeremy Gillick's user avatar
2 votes
0 answers
686 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 ...
crj11's user avatar
  • 5,596
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: ...
Andrew Mills's user avatar
-1 votes
1 answer
548 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 ...
kowshik's user avatar
  • 27
0 votes
0 answers
301 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 ...
Tim's user avatar
  • 1
2 votes
2 answers
853 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 ...
jkiv's user avatar
  • 182
2 votes
0 answers
206 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 ...
chamod's user avatar
  • 526
0 votes
1 answer
206 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....
Marchingband's user avatar
0 votes
0 answers
437 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 (...
Hasan alattar's user avatar
0 votes
1 answer
211 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 ...
John's user avatar
  • 245
0 votes
1 answer
175 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 ...
xavier.seignard's user avatar
0 votes
1 answer
924 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 ...
chamod's user avatar
  • 526
4 votes
2 answers
963 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 ...
Jacob C's user avatar
  • 41
0 votes
1 answer
415 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 ...
Hasan alattar's user avatar
4 votes
3 answers
4k 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 ...
chamod's user avatar
  • 526
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 ...
John Evans's user avatar
2 votes
1 answer
621 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 + ...
Matt Thomas's user avatar
1 vote
1 answer
930 views

difference between CMSIS and ASF

im trying to make c++ project using atmel asf. the compiler have: ...
Hasan alattar's user avatar
0 votes
1 answer
475 views

Intermittent NVM programming error

Occasionally I'll get the following errors while programming my SAMD21 chip. Anyone know the reason? ...
Matt Thomas's user avatar
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 ...
DenR's user avatar
  • 131
-2 votes
1 answer
691 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 ...
jar's user avatar
  • 101
3 votes
5 answers
5k 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 ...
timonsku's user avatar
  • 1,378