BOSSA
BOSSA copied to clipboard
Fix unlock and erase for `bossac`
Previously, for a locked device, bossac would fail if you passed both an --unlock and an --erase flag at the same time, as the erase was scheduled before the unlocking. This PR enforces that any --unlock operation is committed immediately, so that any following erase or write operation can succeed.
Looks fine except I don't think the timer is useful for such a fast operation.
On my board, the unlock operation takes a 'significant' time to complete, so I added the timer to measure.