Hi all,
Just want a quick clarification about the NMI_b pin / ROM boot loader.
Imagine the MCU is powered and running, if I connect NMI_b to GND, is that all it takes to reset the MCU into the bootloader? Or do I need to pull NMI_b to GND and then RESET_b?
Hopefully an easy answer, I'm just a bit confused!
Solved! Go to Solution.
Hi,
The NMI_b pin could lead to generate a non-maskable interrupt (NMI), which could not cause chip reset.
If customer want to re-enter ROM-Bootloader, it need to using RESET_b pin.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
The NMI_b pin could lead to generate a non-maskable interrupt (NMI), which could not cause chip reset.
If customer want to re-enter ROM-Bootloader, it need to using RESET_b pin.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
Is it possible with a single button like this:
If that can't I could also implement the NMI isr to generate a reset or jump to the bootloader. I would prefer a hardware solution, if it's easier.
Or perhaps I can hold NMI_b to GND with a switch, and "reset" by unplugging/plugging in the USB cable?
Please advise!
Thanks,
Joey
Hi Joey,
According to your hardware design, the chip will be reset with external RESET_b pin as expected.
I wonder why you using NMI_b pin here.
When the button was pressed/released, the NMI_b could not be recognized until the chip out of the reset process.
Customer just need RESET_b pin here.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
I want to be able to put the MCU in ROM bootloader mode by pressing a button.
I'm trying to look for how to achieve this!
Thanks,
Joey
Use NMI as NMI and call this function. Button bounce will probably be a problem.
/* Function Pointer returning void, past void pointer: */
void (*_boot_loader_start)( void * arg );
void boot_loader_start( void )
{
/* Read the function address from the ROM API tree: */
uint32_t const _boot_loader_start_address = **(uint32_t **)(0x1C00001CUL);
/* Turn address in to a funciton pointer: */
_boot_loader_start = (void (*)(void * arg))_boot_loader_start_address;
_boot_loader_start( NULL ); /* Call the function. Will not return from here */
}
It is also possible to set up FCFG to always run the bootloader at reset which may or may not be what you really want to do.
Thanks Bob, I think that's one of the solutions.
I'll probably include a RESET button on my board too.
Then I can pick from the solutions:
1) Hold NMI_b to GND and do a manual power cycle.
2) Hold NMI_b to GND and use the RESET button.
3) Make the NMI isr call the bootloader.
4) Make the NMI isr cause a reset.
Thanks!
Use NMI as NMI and call this function. Button bounce will probably be a problem. /* Function Pointer returning void, past void pointer: */ void (*_boot_loader_start)( void * arg ); void boot_loader_start( void ) { /* Read the function address from the ROM API tree: */ uint32_t const _boot_loader_start_address = **(uint32_t **)(0x1C00001CUL); /* Turn address in to a funciton pointer: */ _boot_loader_start = (void (*)(void * arg))_boot_loader_start_address; _boot_loader_start( NULL ); /* Call the function. Will not return from here */ } It is also possible to set up FCFG to always run the bootloader at reset which may or may not be what you really want to do.
How do I get out of this brain dead editor that hoses everything into the advanced editor?
Please don't tell me to hit something in the corner, it is NOT there.