I have a custom Zero. Is there a way to use GPIO0 / EXT3_PIN_10 / PA27 like a digital pin (OUTPUT) using the Arduino tools? I have quite some experience with the atmel 8-bit µC's, but the SAMD21 is quite new to me.
The Mini Breakout from Sparkfun has a TX led connected to it, I want to use it to connect an SD card status LED instead.
Yes you can, but keep in mind that PA27 is used by the bootloader to indicate communication. It is also used by the USB Core when doing SerialUSB transfer I think (I don't use the last samd release).
You will have to modify the bootloader and the USB/Serial core to avoid unexpected blink on your LED if you use the last Arduino samd release.
I have moved it to D8 in the next version of the board just to be safe. But sounds interesting AloyseTech. Do you have some info on how I can start modifying the bootloader etc? I have the IAR software installed and use an Atmel-ICE / Atmel Studio to burn bootloaders in general.
In the bootloader folder there is an Atmel Studio Project, open it with AS7 and it should compile out of the box. Note that the project uses a custom make file for compilation.
Thanks Aloyse! So no real need for IAR Studio then?! I read the application notes for the explained pro and they seem to use that (and Sparkfun/Adafruit too??!).
I believe the first bootloader was developped using IAR. But recently the bootloader had a complete rework (to get rid of the Atmel Software Framework and modify some functionality). This rework has been done using AS7 (and maybe Codebench, I'm not sure) and delivered with the external makefile. You could actually work with bare command line I think. See here for more info about this bootloader rework : History for bootloaders/zero - arduino/ArduinoCore-samd · GitHub
The interesting part is between 5,6,8 and 10 oct. 2015.
Ah, I also found out that in ~/Library/Arduino15/packages/ there are a lot of very interesting files for seeing how adafruit / sparkfun / arduino implement their versions of the SAMD21 software and bootloader.