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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

182 Views
julien_gosteli
Contributor I

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

Labels (1)
0 Kudos
1 Reply

107 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Julien,

 

You can send your MCU to bootloader mode by simply calling NVIC_SystemReset(). Please check the following thread for further reference.

https://community.nxp.com/message/1141791 

Hope it helps! 

Have a great day,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos