I've been trying to get an Atmega328p on an Arduino-clone board with an Optiboot bootloader to reset to the bootstrap on watchdog timeout.
Looking at the fuses, the Reset to Bootstrap bit is 0, which should force a jump to the bootstrap on reset, and in fact an assembly language "jmp 0x7c00" restarts the board correctly.
However, simply configuring the watchdog and letting it time out ends up in the weeds. Interrupt-only mode works, but not System-reset mode.
Looking again at the boot flags the High Fuse bootstrap size bits are 01, which gives a 1024 word / 2048 byte bootstrap partition. The actual partition is 512 word / 1024 bytes, hence the 0x7c00 start address.
I'm using the bootloader which came with the chip, which I can't modify; have I got my arithmetic wrong somewhere, or are the bootloader fuses mis-progammed?
Thanks - Will
The full set of fuses are: Fuse bits (L/E/H): FF FF DA Lock bits: FF Signature: 1E 95 F (ATmega328P) Oscal: AF Fuse Low = 11111111 (FF) ||||++++______Low Power Crystal 8 - 16MHz ||++__________Start Up Time=11 |+____________Clock Output Disabled +_____________(no divide) Fuse High = 11011010 (DA) |||||||+______Reset to Bootstrap |||||++_______1024 words (2048 bytes) ||||+_________EEPROM Erased on chip erase |||+__________Watchdog programmable ||+___________ISP programming enabled |+____________DebugWire off +_____________RST enabled Fuse Extended = 11111111 (FF) |||||+++______Brownout Disabled Lock Bits = 11111111 (FF) ||||||++______Read/Write to everywhere ||||++________R/W Application ||++__________R/W Boot Section