Questions tagged [samd21]

47 questions
3
votes
1 answer

Error connecting DP: cannot read IDR-No connection could be made because target machine actively refused it

I could program and debug this project for the first time. But the problem is that I can't reprogram or debug it again. There is no bootloader on the chip. The only way to communicate with this chip is SWD. As a debugger, I am using Atmel ice. The…
Mary
  • 71
  • 1
  • 7
2
votes
0 answers

How to avoid issues with sleep mode after disconnecting device from PC?

I am having an issue with my satellite project. When I disconnect my device from the PC, sleep mode does not work - I suppose it is because somewhere in the code I have function if, that includes (Serial.available()). But I am not sure, so that is,…
Adaf Boka
  • 21
  • 1
2
votes
0 answers

Atmel SAMD21 DMAC writeback failure?

I'm using multiple DMA channels in an Atmel SAMD21G18A (in an Arduino MKR1000), and I'm seeing some obviously incorrect behaviour. DMA channels 2 & 3 are servicing a SERCOM SPI channel, using single block transfers with a completion interrupt. DMA…
Jeremy
  • 5,055
  • 1
  • 28
  • 44
1
vote
1 answer

Adafruit Trinket M0 (SAMD21) analog read rate slow

Why is the analog read rate seemingly slow (46 ksamples/s) when it should be fast (250 ksamples/s) for my Adafruit Trinket M0? See this simple Arduino code for details; why is PointCount only 46? //TrinketReadRateTest //27Nov2022 //Running on…
1
vote
1 answer

Building Atmel START project to load with UF2 bootloader

I'm trying to build an Atmel START project using GCC such that it will load with the Adafruit UF2 bootloader on a SAMD21 chip. From prior research I've learned that I need to have the text section start at offset 0x2000, and I need to specify the…
Xavier Denis
  • 406
  • 3
  • 14
1
vote
2 answers

SAMD21 SPI configuration without ASF

I'm currently working on a project optimization based on SAMD21J18A µC. My code is working but it's based on ASF API an I'm trying to gradually get rid of it. I managed to do it for most of my code but I'm experiencing difficulties when I want to…
Fanch
  • 44
  • 7
1
vote
1 answer

micropython and sys.implementation- different on XIAO SAMD21 and XIAO RP2040

I was working with micropython on a SEEED XIAO (SAMD21) using version 1.18, and wanted to use 'compiled' libraries (.mpy) to conserve space. I had mpy-cross for version 5 which worked okay for me. I also wanted to have floating point so I built a…
user1725445
  • 63
  • 1
  • 5
1
vote
0 answers

SAMD21 fault writing to Serial after reading I2C data asynchronously

Problem: As soon as I write to the USB serial port after accessing my I2C device asynchronously (polling it in main loop rather than a blocking loop), I get a CPU exception Background: I have an Arduino project running under Microchip studio (for…
N8allan
  • 2,138
  • 19
  • 32
1
vote
0 answers

How to change linker scripts from samd21j18a to samd21e16b for sam-ba?

I am trying to change the linker scripts that sam-ba (sam bootloader assistant) is using. The liner scripts are written for samd21j18a by Atmel Corporation (tcl_lib and applet). The samd21e16b Sram is 8 kB and the flash memory is 64 kB, based on the…
Mary
  • 71
  • 1
  • 7
1
vote
1 answer

what are the arduino IDE build steps for a sketch?

I'm trying to build my own, terminal based environment to build and upload programs to a custom board I Have with an SAMD21 (Like in the arduino MKRZERO) To do so I'm looking at the verbose output of the arduino IDE and trying to move the same…
1
vote
1 answer

Arduino MKR Wifi 1010 Serial Communication with Arduino Mega

I am writing a serial communication program between a mkr wifi 1010 and a mega in which the mkr sends either a H or L char to the mega, and the mega responds by reading the char and setting it's onboard LED to either high or low depending on the…
JGoss
  • 115
  • 1
  • 10
1
vote
1 answer

Why samd21 is reading modbus own response as a master request?

I'm adding slave MODBUS RTU communication over RS-485 (by chip ADM2587EBRWZ) into a SAMD21 existing program. Only Read holding register and Write single register commands implemented as I don't need more. To test it I use a PLC by Microcom as…
NKE-Mick
  • 11
  • 5
1
vote
2 answers

SAMD21: how to set PWM using TCC?

I'm programming a SAMD21 and I need PWM. When I chose pin with F function TCC0 output: PA22 - TCC0/WO[4] PA23 - TCC0/WO[5] I successfully configured TCC0 base counter: // enable clock for TCC0 - disable clock masking PM->APBCMASK.reg |=…
EFK
  • 23
  • 5
1
vote
2 answers

How to determine CRC16 initial checksum so resulting checksum is zero

Working on a SPI communication bus between an array of SAMD MCUs. I have an incoming packet which is something like { 0x00, 0xFF, 0x00, 0xFF }. The receiver chip performs CRC16 check on the incoming packet. Since I am expecting the exact same…
NikoDiYana
  • 31
  • 9
1
vote
1 answer

How to achieve Adafruit Feather M0 Sleep & Wake on External Interrupt using any Pin?

I am currently working on a low-power project using the Adafruit Feather M0 microprocessor. A requirement of my project is to be able to sleep the CPU and wake it again using an external interrupt triggered from the MPU6050 accelerometer. I have…
Philip Crocker
  • 107
  • 5
  • 18
1
2 3 4