Skip to content

Commit

Permalink
Fix temporary page buffer erasing before flashing a new app
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Casanova committed Oct 3, 2018
1 parent 159cb7b commit 652787f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions timonel-bootloader/tml-bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ int main() {
Usi_onReceiverPtr = ReceiveEvent; /* I2C Receive Event */
Usi_onRequestPtr = RequestEvent; /* I2C Request Event */
statusRegister = (1 << ST_APP_READY); /* In principle, assume that there is a valid app in memory */
__SPM_REG = (_BV(CTPB) | _BV(__SPM_ENABLE)); /* Clear temporary page buffer */
asm volatile("spm");
word dlyCounter = TOGGLETIME;
byte exitDly = CYCLESTOEXIT; /* Delay to exit bootloader and run the application if not initialized */
/* ___________________
Expand Down

0 comments on commit 652787f

Please sign in to comment.