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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,166 次查看
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

标签 (1)
标记 (3)
0 项奖励
回复
1 回复

1,091 次查看
FelipeGarcia
NXP Employee
NXP Employee

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 项奖励
回复