Arduino Forum

Products => MKR Boards => MKRZero => Topic started by: evi7538 on Sep 08, 2018, 04:55 pm

Title: Bootloading MKR Zero
Post by: evi7538 on Sep 08, 2018, 04:55 pm
Hi,

Can I upload a bootloader to MKR Zero by using ArduinoISP ISCP through SPI of the MKR (the same way other Arduino boards can be bootloaded https://www.arduino.cc/en/Tutorial/ArduinoISP (https://www.arduino.cc/en/Tutorial/ArduinoISP) )?

Or do I have to use the SWD interface on the MKR and use Atmel-ICE programmer?


Thanks
Title: Re: Bootloading MKR Zero
Post by: evi7538 on Sep 08, 2018, 05:04 pm
To clarify: I designing a board with SAMD21 based on MKR Zero so I will need to upload a bootloader into fresh SAMD21 chips after they are soldered on the board. So I need to know whether to place the pads on the board for ISP connected to SPI+Reset or to the SWD interface? Pads connected to SWD is the way it's done on the original MKR board but I'd like to try the SPI programming, it seems to be easier/cheaper than using AtmelStudio and Atmel-ICE (could be done with ArduinoISP and IDE, although needs one extra pin), but only if it works.
Title: Re: Bootloading MKR Zero
Post by: ballscrewbob on Sep 08, 2018, 05:06 pm
JTAG / SWD  would be the preferred method.

Not seen anyone go ICSP with the MKR series (not to say it cannot be done).

JTAG programmers are quite cheap on Ebay and such and there are a lot of other alternatives to the expensive programmers.

Title: Re: Bootloading MKR Zero
Post by: evi7538 on Sep 08, 2018, 05:38 pm
JTAG programmers are quite cheap on Ebay and such and there are a lot of other alternatives to the expensive programmers.
Thanks. I'm new to JTAG bootloading so I'm afraid to buy a programmer on Ebay without knowing for sure that it can be smoothly used with Atmel Studio. So I'll probably will go with expensive Atmel ICE just to be safe.

Unless someone could point me to a cheaper programmer that was tested with the MKR Zero (and a SW that works with it for FW uploading)?
Title: Re: Bootloading MKR Zero
Post by: evi7538 on Sep 08, 2018, 09:33 pm
Not seen anyone go ICSP with the MKR series (not to say it cannot be done).
I just tried this with Adruino as ISP, can't make it work.
So I'll go for programming through SWD
Title: Re: Bootloading MKR Zero
Post by: LC200 on Sep 20, 2018, 04:04 pm
Hi

I'm using the Atmel ICE here and had zero problems uploading the bootloader via SWD it's also useful for setting fuses etc if required from Atmel studio.

This was on a home built PCB with blank chips, if you are designing your own board just make sure you have the necessary pins broken out for the programmer to connect to.  Also you can use the programmer to program sketches directly, which seems faster to me, so then ironically you don't need the bootloader, unless of course you are making more than one and need in the field updates without needing the programmer.

Lee
Title: Re: Bootloading MKR Zero
Post by: evi7538 on Oct 05, 2018, 05:01 am
Tanks all, I was able to successfully bootload my MKR through Atmel ICE with self-made pogo-pin adapter