Questions tagged [samd21]

47 questions
0
votes
1 answer

Why are non-consecutive loads faster, even when the cache miss penalty is guaranteed to be zero?

Background: I wrote a function in C and compiled it with arm-none-eabi-gcc (7-2018-q2-update). The generated assembly code for the loop body looks like it should take 20 cycles per iteration, including 2 wait states for load operations accessing…
itoqixer
  • 1
  • 1
  • 1
0
votes
1 answer

SAMD21 ecrypted firmware

I'am working on SAMD21, but now I'd like to implement the possibility to ecrupted firmware. Is it possible on the SAMD21? I find this pdf this is exactly what I want to do page 36 but this for SAM3/4 AT02333 I googled, but I found nothing for…
simon
  • 1,180
  • 3
  • 12
  • 33
0
votes
1 answer

Atmel SAMD21 microcontroller not making a USB port anymore

My custom board with Atmel SAMD21 microcontroller (same as Arduino MKR Zero) is not making a USB port since yesterday. The board was working fine before that. Please suggest ways to resolve this issue. What are the possible reasons for such an…
Abstract123
  • 67
  • 1
  • 8
0
votes
0 answers

SAMD21 doesn't wake up after deep sleep

I'am working on a personnal board build with an atsamd21e18a. I'am actually working on sleep mode. I make a function to put samd21 in sleep mode like that. I use RTCZero library. So in my setup function I've something like this RTCZero rtc; void…
simon
  • 1,180
  • 3
  • 12
  • 33
0
votes
1 answer

Arduino very randomly freezes on printing float to string via String and sprintf

TLDR: I am getting consistent freezes when printing floats to a String via arduinos String class. Previously I was getting the same freeze with sprintf and %f. I've solved the problem using the PString class, but I would like to understand the…
kagama
  • 92
  • 1
  • 7
0
votes
0 answers

Read resgister LSM6DSO32 Arduino

I would like to read some register from a LSM6DSO32 captor. But I've a problem for me tha values I got are strange. I user Atmel SAMD21 Cortex M0 and i2C for communicate with the captor. First off all I set my captor to 8g and 500° for gyroscope…
simon
  • 1,180
  • 3
  • 12
  • 33
0
votes
0 answers

Proper configuration for I2C Pins on the Arduino Zero (normally reserved pins)

I am using an Arduino Zero core on my SAMD21 with Atmel Studio. I have an I2C device hooked up to pins PB02 (Arduino Zero pin 19) and PB03 (Arduino Zero pin 25). As a side note, this exact same device functions without issue on the regular wire…
0
votes
1 answer

Setting SERCOM pins for SPI as the-opposite-of-a-master on SAMD21 not working

I'm trying to make my SAMD21 chip a SPI Slave. I have the following pins: PB10 as MOSI PB11 as SCK PA10 as SS PA12 as MISO Most of these pins belong to SERCOM4 However, the pins are not working properly when I set them as followed: …
Rick Vink
  • 321
  • 1
  • 3
  • 11
0
votes
1 answer

Is possible to test SPI communication winhout external module

I have a very simple question, I suppose... I am programming on a SAMD21 board with two SPI communications (one classis SPI and second int SPI), In my opinion the int SPI does not work correctly. If i connect some senzor, it does print nothing to…
HASHTAG
  • 81
  • 1
  • 4
0
votes
0 answers

Controlling GPIO pins: One class for all pins or one class for each pin?

I'm writing my first program for SAMD21 and I'm gonna create GPIO class. I wonder if is better to create one class for all pins, such as arduino: pinMode(led, OUTPUT) or create class for each pin such as: led.pinMode(OUTPUT) How is it done in…
EFK
  • 23
  • 5
0
votes
0 answers

Embedded system: Missing sound after WDT / sleep fct

I hope there are a few people here who have advanced experience in embedded systems: I designed a PCB with an Atmel Samd21 MCU which is supposed to play .wav files over the amplifier TAS5805 (connected by i2s). The .wav file is run via DMA (data…
0
votes
0 answers

How to control multiple SPI's

I am having a weeny trouble with my SAMD21 board. I have got this starter kit (schematics) and I want to add some more sensors. They use SPI, so I programmed them. Since SAMD21 got the code it lag's everytime, when code reache's the sensor begin…
Adaf Boka
  • 21
  • 1
0
votes
3 answers

Reading output pin level on SAMDG55

I'm building a firmware for a device based on Atmel/Microchip AT SAMG55. In a simple function, trigger some relais connected to GPIO pins. Because I want to interlock different I/O, avoiding that 2 specific outputs are high level on the same time, I…
0
votes
0 answers

C++ pointer perils? How do I successfully create a more universal i2c / TWI library for Arduino?

I'm working on a project where I use multiple i2c IC's / sensors. Adafruit has very nice basic libraries for the individual IC's and that is very convenient (spares hours of digging through datasheets). But their libraries are inflexible. I tried to…
JopieK
  • 68
  • 9
0
votes
1 answer

Using External Vref for SAMD21 DAC

I use SAMD21 Xplained board. I run a DAC example provided by Atmel Studio: DAC_QUICKSTART1 In header file that comes with the example (dac_feature.h), I have following enum: enum dac_reference { /** 1V from the internal band-gap reference*/ …
DenR
  • 33
  • 5