AnsweredAssumed Answered

K64 enter in bootloader from user application in order to upload a new application

Question asked by Julien Gosteli on Nov 12, 2019
Latest reply on Nov 14, 2019 by Felipe García

I would like to update my firmware remotely by pushing my microcontroller (MK64FN1M0VLQ12) in bootloader mode and send the new application via UART.

How do I enter in the bootloader mode through my application in order to send the new firmware by the UART.

I try this,
#define BL_VECTORS 0x0
uint32_t run_bootloader;

/**
* Step: Disable systick timer and reset it to default values
*/
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;

/**
* Step: Disable all interrupts
*/
__disable_irq();

/**
* Jump to boot_loader
*/
run_bootloader = ((uint32_t*)BL_VECTORS)[1];
((void(*)(void))run_bootloader)();

My application make a reset and restart my application.

 

 

Thank you in advance.

Julien

Outcomes