Watchdog-timeout-reset

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

Watchdog-timeout-reset

926件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom84 on Wed Jul 11 04:35:35 MST 2012
Hello,

I have got a question about the LPC1758 and a reset.
As in the usemanual described on page 772 i can't use the NVIC_SystemReset().
I have to use the Watchdog-timeout:
The usermanual says:
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]The Watchdog should be used in the following manner:[/SIZE][/FONT][/SIZE][/FONT][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2] - Set the Watchdog timer constant reload value in WDTC register.[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][/FONT][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]- Setup the Watchdog timer operating mode in WDMOD register.[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2][/SIZE][/FONT][/SIZE][/FONT][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]- Enable the Watchdog by writing 0xAA followed by 0x55 to the WDFEED register.[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]- The Watchdog should be fed again before the Watchdog counter underflows to[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]prevent reset/interrupt.[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2][/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]This is my Code:[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2][SIZE=2]LPC_WDT->[COLOR=#0000c0]TC[/COLOR][SIZE=2] = 0xFF;   // set constant value in WDT register[/SIZE]
[/SIZE][SIZE=2]

LPC_WDT->[COLOR=#0000c0]MOD[/COLOR][SIZE=2] = 3;     // setup operating mode- 1) watchdog running [/SIZE]
[SIZE=2]                                         // 2)timeout->reset[/SIZE][/SIZE][SIZE=2] [/SIZE][SIZE=2]LPC_WDT->[COLOR=#0000c0]FEED[/COLOR][SIZE=2] =0xAA;  //enable[/SIZE]
[/SIZE][SIZE=2]

LPC_WDT->[COLOR=#0000c0]FEED[/COLOR][SIZE=2] =0x55;   //enable[/SIZE][SIZE=2][/SIZE]
for(;;){}   // do nothing till timeout

Why does my code not work? What did i forgot?
[/SIZE][SIZE=2][/SIZE]
[SIZE=2][/SIZE][/SIZE][/FONT][/SIZE][/FONT]
0 件の賞賛
返信
2 返答(返信)

783件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbhefner on Fri Dec 07 09:22:15 MST 2012
Sorry to bump this old thread, but I'm having the same problem with a 1768. When I try to write to the WDFEED register, I see no change. I'm wondering if that's just because it's a write-only register. The WDTV never updates to match the WDTC, it always contains 0xFF

I've run it with a debugger, and when I step slowly through my kick function, which disables interrupts, writes 0xAA, writes 0x55, and then enables interrupts, I get different results. As soon as I disable the interrupts, WDTV comes up with a value that's much closer to my WDTC. When I step to the next line, which writes 0xAA to WDFEED, the watchdog interrupt or reset occurs. I realize that it will behave differently with the debugger attached, but as far as I can tell, I should be getting a WD reset whenever I halt the program, or fail to kick the WDT for longer than the timeout and neither is happening.

Does anyone here have experience with the WDT on the 17xx devices?

Thanks!
0 件の賞賛
返信

783件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom84 on Wed Jul 11 06:46:13 MST 2012
Has no one an idea?

By the way, i tried to use the NVIC_SystemReset() and it works :confused:

I still would like to know what i have done wrong using the WDT.

Please help me.....
0 件の賞賛
返信