diff --git a/timonel-bootloader/tml-bootloader.c b/timonel-bootloader/tml-bootloader.c index c8dfe0d9..84e959d4 100644 --- a/timonel-bootloader/tml-bootloader.c +++ b/timonel-bootloader/tml-bootloader.c @@ -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 */ /* ___________________