Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programming a ATSAMD21E18A without bootloader #2

Open
heliosoph opened this issue Aug 27, 2021 · 3 comments
Open

Programming a ATSAMD21E18A without bootloader #2

heliosoph opened this issue Aug 27, 2021 · 3 comments

Comments

@heliosoph
Copy link

At the moment I am designing a custom board with the ATSAMD21E18A. I want to program the controller directly via SWD without using a bootloader and USB. This could save me a USB connector on my board. For initial tests the controller sits on a breadboard. My programmer is the Atmel ICE. Connection via openocd is fine.

In the Arduino IDE I selected
SAMD DevBoards,
Board "SAMD21E DevBoard",
Microcontroller "SAMD21E18A",
Clock Source "Internal Oscillator",
USB Config "USB disabled",
Serial Config "1xUART, 1xWIRE, 1xSPI",
Bootloader "No Bootloader",
Timer PWM Frequency "732.4Hz (16Bit)",
Floating Point "Print & String use auto-promoted doubles only"
Build Options "config.h disabled"

I was able to upload the blink example. It worked but I got some error messages that I unfortunately didn't copy. The blink example is running but the chip is bricked. No SWD connection is possible.

My questions are: Did you ever test uploading a sketch from the IDE without bootloader? Do you see any errors in what I did? Do you have any recommendations?

Thanks in advance

heliosoph

@wagiminator
Copy link
Owner

Hi, I tried it with your settings on my board. However, since I don't have an Atmel ICE, I used my SWD adapter. It worked for me with no problems. I also cannot imagine that the SAMD can be bricked so easily. Have you already tried another Arduino core (e.g. https://github.com/mattairtech/ArduinoCore-samd)? You can also try to install the bootoloader by hand (https://github.com/wagiminator/SAMD-Development-Boards/blob/main/SAMD21E_DevBoard/bootloader/readme.txt) and see if it works.

@heliosoph
Copy link
Author

Hi wagiminator,
thanks a lot for your testing and your quick reply! I tested with my Atmel ICE and a new chip and it works like a charm :-) I use the standard Arduino SAMD core. Programming also seems to be much faster than via USB. Don't know what I really did in the first try. Now it works and I have a starting point for my project.

Thanks

heliosoph

@wagiminator
Copy link
Owner

Well that sounds good. I wish you every success with your project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants