Opened 4 months ago

Last modified 10 days ago

#27 new enhancement

ATMEGA8A: Set a correct reset flag in MCUCSR

Reported by: dsl Owned by: dsl
Priority: major Milestone: MCUSim-0.2
Component: avr Keywords: planned-in-0.2
Cc: Pawel

Description

The ATmega8A has four sources of Reset (see 15.2. Reset Sources):

  • Power-on Reset. The MCU is reset when the supply voltage is below the Power-on Reset threshold.
  • External Reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse length.
  • Watchdog Reset. The MCU is reset when the Watchdog Timer period expires and the Watchdog is enabled.
  • Brown-out Reset. The MCU is reset when the supply voltage Vcc is below the Brown-out Reset threshold and the Brown-out Detector is enabled.

It means that MCUCSR register has to be updated according to the specific reset
reason. Some bootloaders (like Optiboot) use MCUCSR to find what the last reset
reason really was, and choose a bootloader or a program code to run.

Change History (3)

comment:1 Changed 7 weeks ago by dsl

Milestone: MCUSim-0.2MCUSim 0.2

Milestone renamed

comment:2 Changed 7 weeks ago by dsl

Milestone: MCUSim 0.2mcusim 0.2

Milestone renamed

comment:3 Changed 10 days ago by dsl

Milestone: mcusim 0.2MCUSim-0.2

Milestone renamed

Note: See TracTickets for help on using tickets.