Go Down

Topic: Program SAMD21G18A MCU using ATMEL ICE (Read 409 times) previous topic - next topic


I am trying to program the ATSAMD21G18A MCU using ATMEL ICE to run a sample Arduino code to test my Bluetooth module. I tried to import the Arduino project to ATMEL Studio 7 by creating an Arduino sketch in AS7 but I am facing various library issues when I try to build the code. I also tried to program the MCU through Arduino IDE using Upload using programmer option. But I am facing the following error.

Error: at91samd21g18.cpu -- clearing lockup after double fault

What is the best way to program an Arduino code to ATSAMD21G18A MCU? 


I used the Arduino IDE to program the Arduino MKR Zero with Atmel ICE. Here is the procedure:

1.   Connect the Atmel-ICE programmer to the computer through USB cable
2.   Connect the MKR Zero to the computer through another USB cable, or connect the MKR Zero board supply pins to 5V supply
3.   Make sure the middle LED on the Atmel-ICE is RED and the left LED is GREEN
4.   Open Arduino IDE, load the sketch
5.   make sure the "Tools-> Board" is set to "Arduino MKRZERO" and the "Tools->Port" is connected to the corresponding COM port
6.   Make sure the "Tools->Programmer" is set to "Atmel SAM-ICE"
7.   Select "Tools-> Burn bootloader"
8.   Make sure the bootloading was successful: the message in the Arduino IDE should be "Done burning bootloader"

I assume programming the Zero would be similar

Go Up