mattairtech / SAMD-MSD-Bootloader

USB MSD (Mass Storage Device) bootloader for Atmel SAMD chips
Other
36 stars 10 forks source link

Compatibility with original Arduino Zero? #1

Closed AloyseTech closed 8 years ago

AloyseTech commented 8 years ago

Hi, Is this bootloader compatible with a standard Arduino Zero, or M0/M0 Pro board, without change?

mattairtech commented 8 years ago

The precompiled hex files use PA27 for the bootloader entry button and PA28 for the LED. These conflict with the Zero which uses PA27 for the TX LED, and PA28 as USB Host Enable. You will need to modify the user_board.h file to change these pins. I can compile it myself and put the hex on Github with the rest of the hex files if you have a Zero to test it out. It could use arduino pin 13 for the LED, but I'm not sure what to use for the bootloader entry. The user could jumper a certain pin to ground. Maybe the ATN pin (PA13) which last time I checked was currently unused but intended for future SPI CS? The bootloader always runs first after reset, and it will always enable a pullup on the pin chosen, so it would still be compatible with shields that use this as a chip select.

mattairtech commented 8 years ago

There is also the possibility of adding double-tap support to the reset button (like the Zero SAM-BA bootloader), thus not requiring a separate button or jumper at all. I am short on time, so this option might not happen soon. I accept PRs though :octocat:

AloyseTech commented 8 years ago

Could you please compile the code with PA09 as button and PA17 as the LED? :) I would like to give a try to this bootloader. I will try to implement the double tap feature in the future :)

mattairtech commented 8 years ago

I pushed the hex file to the repo. It is named msd_bootloader_samd21g18a_flash_Zero_Boot_Pin_D3.hex