Fixing device bricking bug

- When loading a garbage image onto the device, the chip hangs
  and refuses to jump to the bootloader and start dfu

Fix
- Check if chip was in locked state and jump to dfu
- Check if watchdog timer fired and jump to dfu
This commit is contained in:
Jacob Alexander 2015-01-10 19:53:46 -08:00
parent 8e54672121
commit 2c7542e2e7
3 changed files with 38 additions and 18 deletions

View file

@ -20,11 +20,26 @@
#| You _MUST_ clean the build directory if you change this value
#|
set( CHIP
"mk20dx128vlf5" # McHCK mk20dx128vlf5
# "mk20dx256vlh7" # Kiibohd-dfu
"mk20dx128vlf5" # McHCK mk20dx128vlf5
# "mk20dx256vlh7" # Kiibohd-dfu mk20dx256vlh7
)
###
# Compiler Selection
#
#| *** EXPERIMENTAL ***
#| Stick with gcc unless you know what you're doing
#| Currently only arm is supported with clang
set( COMPILER
"gcc" # arm-none-eabi-gcc / avr-gcc - Default
# "clang" # arm-none-eabi
CACHE STRING "Compiler Type" )
###
# Bootloader Configuration
#