Questions tagged [samd21]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
56 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 ...
1
vote
0answers
31 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 ...
4
votes
2answers
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
0answers
6 views

SAMD20/21 development on Ubuntu without IDE

As someone who is trying to break away from high-level APIs for embedded development, I wanted to try out programming Atmel's (or Microchip's) SAMD20 or 21 mcus directly without any IDEs or tools ...
0
votes
0answers
32 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 ...
0
votes
0answers
29 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 ...
2
votes
2answers
105 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 ...
1
vote
0answers
76 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 ...
0
votes
1answer
63 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
0answers
47 views

SAMD21G18 not working at 1.8V

I am working with a SAMD21G18 and a custom board based on Sparkfun design and I am using VSC + PlatformIO. Actually I want to run at 1.8V instead of 3.3V. Now, the hardware works well at 3.3V but ...
0
votes
0answers
34 views

Timer vs PWM channel in variant.cpp (SAMD)

Looking at an example variant file such as this one for an ItsyBitsy M4, what is the difference between the PWM channel and the timer channel? My understanding was that they correspond to the same ...
0
votes
0answers
86 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
0answers
103 views

Slow Adapter Speed on SAMD chips with FT2232H and FT232H

I have been using a FT223H breakout board from Adafruit along with openocd as a cheap SWD programmer for my ATSAMD21 projects both on breadboard as well as final products. It had an odd issue where ...
0
votes
1answer
70 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 ...
0
votes
1answer
68 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
1answer
239 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 ...
4
votes
2answers
201 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
1answer
122 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 ...
1
vote
2answers
1k 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 ...
1
vote
0answers
446 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
1answer
298 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 + ...
0
votes
1answer
383 views

difference between CMSIS and ASF

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

Intermittent NVM programming error

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

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 ...
-2
votes
1answer
431 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 ...
1
vote
3answers
2k 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 ...