So sink or swim I jumped in at the deep end ... a custom made board with a blank ATMega32U2 MCU. Yep, I know ... not novice ground, but I think I've done well ....
- Running from an external 16MHz clock (because of that pesky 48MHz USB clock requirement) :)
- Programmed the fuses via AVRDUDE :)
- Compiled and loaded a LUFA CDC bootloader using Atmel Studio 7.0 via ArduinoISP :)
- Seeing bootloader and application USB virtual comm ports in WIndows 10 :)
- Successfully uploaded application code via the Arduino IDE :)
Stuck now for two days on this problem: when I enter the bootloader via a reset, I can't get out of it without powering off/on or uploading new application code.
I'm a complete code buffoon but the bootloaderCDC.c file seems to mention lots of ways it's supposed to jump to the application code. I was expecting some kind of timeout, like Optiboot ... run bootloader, no attempt to upload after 10 seconds ... jump to the application code. But it just sits there forever in the bootloader. Connect with AVRDUDE or upload via Arduino IDE (or power off/on) and it jumps just fine.
Can somebody point me in the right direction to exiting the bootloader after some time following a reset?
I've attached the bootloaderCDC.c file (not modified in anyway from the LUFA CDC example)
p.s. my fuses are: L:E0 H:D8 E:CE L:2F* *locked after bootloader uploaded.