Skip to content

Can't read MCUSR because bootloader resets it to 0 #3

Description

@specternecter

I know this issue stems from the original Caterina bootloader but this is the bootloader I'm using so I'm asking here. My application needs to see what caused a reset in order to properly interact with the USB host, but on line 146 of AnyKey.c, the MCUSR register is immediately reset to 0 after it's read. This renders it impossible to read the reset condition in the application. Can you move that line down to say line 163 or just remove it entirely (if possible) so people can read that register?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions