NMI_b explanation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NMI_b explanation

Jump to solution
1,590 Views
joeygouly
Contributor IV

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!

0 Kudos
1 Solution
1,281 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

8 Replies
1,282 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

1,281 Views
joeygouly
Contributor IV

Hi Hui,

Is it possible with a single button like this:

zh0YIBe.png

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

0 Kudos
1,281 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,281 Views
joeygouly
Contributor IV

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

0 Kudos
1,281 Views
bobpaddock
Senior Contributor III

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.

1,281 Views
joeygouly
Contributor IV

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!

0 Kudos
1,281 Views
bobpaddock
Senior Contributor III

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.

0 Kudos
1,281 Views
bobpaddock
Senior Contributor III

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.

0 Kudos