LPC802 reset and ISP pin

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

LPC802 reset and ISP pin

Jump to solution
1,361 Views
arda_otuz
Contributor II

Hello,

I am using LPC802M001JDH20 in my project and have two questions regarding pins: PIO012 and nRESET/PIO0_5.

I want to use these pins as I/O and do not want neither reset nor ISP functionality.

1. In my hardware design my nRESET pin is connected to GND and stays connected as the power is applied to the MCU. As far as I know from the datasheet, nRESET functionality can be disabled by writing to appropriate registers, but the question is; until the appropriate register is written, how will the MCU know I want the nRESET pin to be disabled?

I need a way to tell the programmer (or linker?) to put some special values at specific addresses during the programming phase. 

I also explicitly write the code below besides the one created by config tools to make sure nRESET function is disabled but as a said it is too late since the CPU does not even reach that point.

"SWM_SetFixedPinSelect(SWM0, kSWM_RESETN, false);"

As MCU starts when nRESET pin is connected to VDD, it executes code as I want but when it is powered up whilst the nRESET pin is connected to GND, MCU does not work as the same (same with when connected to VDD).

2. I do not want any kind of ISP functionality, but MCU goes into ISP mode as MCU starts if PIO0_12 pin is connected to GND. My hardware also connects this pin to GND. I also want to disable this feature.

" A LOW level on this pin during reset starts the ISP command handler."

pastedImage_1.png

So to disable this feature I do the following at the beginning of the program:

int main(void)
{

/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();

uint32_t volatile * const crp = (uint32_t *)(0x000002FC) ;
*crp= 0x4E697370;

...

...

After CPU executes (or attempts to execute idk) the write operation (*crp...), it goes to:

void HardFault_Handler(void)
{ while(1) {}
}

Overall,

I need a way to tell the linker/programmer to put a specific data at a specific address inside flash. How do I do that with McuXpresso?

My hardware connects both of these pins to GND.

Through Config Tools, PIO0_12 (ISP) pin is configured as digital input and nRESET pin as digital output.

I do not want any of reset and ISP features.

What should I do in this case to make sure reset and ISP functionality is disabled and MCU starts and treats these pins as simple I/O?

Labels (1)
1 Solution
1,283 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Arda Otuz,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
1) I'm afraid it's impossible to disable the reset pin function prior to boot up.
2) Please refer to the application to implement the code read protection feature.

Have a great day,
TIC

 

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

View solution in original post

1 Reply
1,284 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Arda Otuz,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
1) I'm afraid it's impossible to disable the reset pin function prior to boot up.
2) Please refer to the application to implement the code read protection feature.

Have a great day,
TIC

 

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