How to config LPC1850 ISP pin (P2_7) from EMC A9

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

How to config LPC1850 ISP pin (P2_7) from EMC A9

502 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hitpony on Sun Nov 09 10:06:47 MST 2014
I am using LPC1850, and P2_7 is used as A9 of EMC, and at the beginning of the program, EMC is initialized, and program needs to access to EMC for some global variable initialization, after that, a watchdog is started, and needs to change P2_7 from EMC_A9 to GPIO0[7], and set to HIGH, in order to let the watchdog trigger the reset and enter the bootloader again (I do not want to enter ISP after watchdog). in the UM10430, P2_7 GPIO0[7] described as:

GPIO0[7] — General purpose digital input/output pin. ISP entry pin. If this pin is pulled LOW at reset, the part enters ISP mode using USART0.

Does anyone know how can I reconfigure P2_7 from EMC_A9 to GPIO0[7]? do I needs to stop EMC controller? In the HW, P2_7 is connected to EMC (a NORFLASH) only, and no switch connected to it, so I can NOT force to pull it HIGH via HW, I am wonderring whether I can pull it HIGH via SW, and what is the best steps to do it under such HW design?

Thanks in advance!
Labels (1)
0 Kudos
1 Reply

409 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Wed Nov 12 07:24:52 MST 2014
The configuration of the pins is controlled by the SFSP2_7 register (see Tables 171 and 172 in UM10430 LPC18xx Users Manual).
If you want to change the function of the pin, you would change SFSP2_7 MODE from Function 3 (EMC_A9) to Function 0 (GPIO0[7]).  If the EMC is not active, you can switch the function from EMC to GPIO, but it would be best to stop the EMC controller before changing one of the address pins to a GPIO.

If I understand your question, the issue is that you don't want to enter ISP mode after a watchdog reset.  This should not be an issue.  After the watchdog reset, P2_7 should be configured automatically as a GPIO with an internal pull-up.  This should ensure that the LPC1850 does not enter ISP mode.

- Paul
0 Kudos