Skip to content

Timing glitch after single step: AVR8_FAILURE_ILLEGAL_STATE: Illegal run / stopped state #60

@felias-fogg

Description

@felias-fogg

When using one of the Atmel debuggers (Atmel-ICE, Power-Debugger, or JTAGICE3) on debugWIRE targets (tested: ATmega328P, ATtiny84, and ATtiny85), I experience a strange behavior. Immediately after a single step, an SRAM location (status register) is read, which results in the exception mentioned in the title line. It probably means that I tried to read from SRAM before the MCU was completely (?) stopped.
This does not happen with mEDBG, SNAP, or PICkit4. It also does not happen with JTAG targets.

One way around it is to wait an additional 40 ms after the step function returns. Alternatively, one can set self.use_events_for_run_stop_state in AvrDebugger to False, so that instead of the poll_event method the _read_running_state method is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions