LPC18xx and NVIC_SystemReset()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC18xx and NVIC_SystemReset()

2,168件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mch on Wed Jun 25 08:09:36 MST 2014
We have a board design based on the LPC1837 and want to cause a software reset. We have used the NVIC_SystemReset() function on other LPC based design and it worked fine. However on this board it does not, it just seems to cause the board to hang and we need a power cycle before we can access it with the debugger again.

We have tried this with a Keil MCB1800 eval board and we get the same behaviour.

The RGU on this CPU is quite complex so it may be that there may be some extra setup here to get it to work.

We are using the Keil MDK v5.10 for our development so hopefully this will be pulling in the correct CMISS libraries.

Has anyone else got this to work, or can anyone suggest some code we can use to cause a hardware reset.

I should say that the WDT reset does work, however we don't want to use this as we want to reserve this for software lockups.
ラベル(1)
5 返答(返信)

1,481件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hitpony on Fri Nov 07 03:58:07 MST 2014
Thanks mc, this really bring a good direction for me.

I have checked the schematic, the ISP pin (P2_7) is used as EMC_A9 for my external NORFLASH, even though at the time when watchdog start, the EMC will not be used in later program, can I directly do the followings, before (or just after) the watchdog init:

scu_pinmux(2, 7, MD_PUP, 0);    // EXTBUS_A9
GPIO_SetDir(2, 0x0080, 1);
GPIO_SetValue(2, 0x0080);

I have did some test, but the program will hang just after "scu_pinmux(2, 7, MD_PUP, 0);", and watchdog will trigger the reset.

Thanks mc!
0 件の賞賛
返信

1,481件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Nov 06 16:33:12 MST 2014
Hi hitpony,
Check  ISP pin. If you are using ISP pin in your application pull it up.
0 件の賞賛
返信

1,481件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hitpony on Thu Nov 06 10:17:59 MST 2014
I am using LPC1850, and try your command of the followings:

*(volatile unsigned int *)0x40043100 = 0x10400000; //memmap with boot ROM address
*(volatile unsigned int *)0x40053100 =(1<<0); // Core reset

But the system still hang and can not be reset automatically, and need to press the reset button, or power-off and on, could I understand what could be the possible reason for it? could it be hardware issue with some PIN with certain level of voltage?

Thanks ...
0 件の賞賛
返信

1,481件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mch on Thu Jun 26 02:08:33 MST 2014
Thanks very much, that works a treat!!
0 件の賞賛
返信

1,481件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Jun 25 09:10:00 MST 2014
Hi mch,
Please use core reset instead. Below 2 instructions should solve your problem.

*(volatile unsigned int *)0x40043100 = 0x10400000;      //memmap with boot ROM address
*(volatile unsigned  int *)0x40053100 =(1<<0); // Core reset

0 件の賞賛
返信