My home project to votlage glitch an Arduino Nano board using an ESP32. Measuring is done in an automated manner using a Digilent Analog Discovery 2 (and a Nordic Power Profiler Kit 2).
- Table of contents
- Architecture diagram
- Pinout matrix
- Compiling glitcher
- Arduino bootloader problems
- Target compile notes
- Interesting resources
| Function | Glitcher pin | Target pin | Scope pin |
|---|---|---|---|
| Target Reset | D23 | RST | NC |
| FET out | D13 | FET gate | NC (or 1+ for debug) |
| Start indicator | D14 | NC | T1 |
| Success indicator | D15 | A3 | - |
| Voltage monitoring | - | VCC | 1+ |
cd esp-idf. export.fishcd ../glitcheridf.py build && idf.py flash && idf.py monitor
The bootloader takes up a lot of time to wait for on external programming request (around 2s). Therefore, we need to disable the bootloader, but then an external programmer is necessary to re-program the device. For this I used an an usbasp avr clone with these fuse settings:
- LOW = 0xFF
- HIGH = 0xD8
- EFUSE = 0xCB
- LOCK = 0x2C
avr-gcc optimizes away the dead code after the end loop no matter if I disable the optimization flags. The fix was to re-write the target code in assembly.
