The first line of code in my ASM app after the JMP RESET_HANDLER at program location zero grabs MCUCSR and stores it in a SRAM variable.
I'm consistently seeing 0x47 being stored which according to the datasheet indicates the following are set:
ISC2 - which looks a bit complicated as to what it actually means!
BORF - brown out reset flag
EXTRF - external reset flag
PORF - power-on reset flag
I'm powering my circuit from the ISP pins on an STK500 and it doesn't matter whether I'm:
- turning the STK500 power on from cold
- pressing the reset switch on the STK500
- doing a forced jump to the RESET_HANDLER from within the code
I didn't expect to see 0x47 every time :cry: