screwpilot
Published © GPL3+

Arduino Due "Power-Ups"

Proof of concept aimed to "unlock" an RTC, an EEPROM and a few other things.

AdvancedProtip4 hours5,945

Things used in this project

Hardware components

Arduino Due
Arduino Due
×1
USBasp Programmer
There are anyways several solutions to upload the firmware on the 16u2
×1
Ultra ATA Ribbon Cable
Lots of lots of thin wires
×1
2k7 0603 size resistor
×3
Around ~6V Zener diode
If you want to fit this component, a bit of electronic investigation must be made, load it with 12V through a 10Meg resistor and read the voltage across it with a digital multimeter, if more than 3.3V it's good
×1
32.768 kHz Crystal
32.768 kHz Crystal
×1
Capacitor 22 pF
Capacitor 22 pF
×2

Software apps and online services

RTCDue library

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Use one with a good small tip, and ensure that ground wire is earthed
Thin and GOOD solder wire (don't buy here)
Good solder wire is a mystical subject
Cutter with a fresh blade
LOL

Story

Read more

Schematics

16u2 Pin Map

Mod Map Top

Mod Map Bottom

V2 track routes

Beware that copper "lands" are not shown, even if they are little, believe it or not it's a 3 layers PCB, as far as i know only the 3.3V net belongs to the inner layer

V3 track routes

Copper "lands" are not shown, i think it's just a 2 layers PCB

ATMega16u2 stuff and library

This contains...
* The new firmware to upload on the 16u2 in "raw binary" format
* The DueEEPROM library for the IDE
* (optional) Source code to compile the 16u2 firmware with the LUFA toolchain

Code

Untitled file

C/C++
#define SYS_BOARD_PLLAR (CKGR_PLLAR_ONE | CKGR_PLLAR_MULA(18UL) | CKGR_PLLAR_PLLACOUNT(0x3fUL) | CKGR_PLLAR_DIVA(1UL))
#define SYS_BOARD_MCKR ( PMC_MCKR_PRES_CLK_2 | PMC_MCKR_CSS_PLLA_CLK)
//Set FWS according to SYS_BOARD_MCKR configuration
EFC0->EEFC_FMR = EEFC_FMR_FWS(4); //4 waitstate flash access
EFC1->EEFC_FMR = EEFC_FMR_FWS(4);
// Initialize PLLA to 114MHz
PMC->CKGR_PLLAR = SYS_BOARD_PLLAR;
while (!(PMC->PMC_SR & PMC_SR_LOCKA)) {}
PMC->PMC_MCKR = SYS_BOARD_MCKR;
while (!(PMC->PMC_SR & PMC_SR_MCKRDY)) {}
// Re-initialize some stuff with the new speed
SystemCoreClockUpdate();

Credits

screwpilot

screwpilot

2 projects • 5 followers

Comments