WDT
2005-06-20 by seeessarr
hi everybody well i am trying to explore the WDT in LPC 2129. I am displaying a hex value through UART when WDT generates the interrupt. but iam not able to get interrupt . can any one tell me how to do this thanks
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2005-06-20 by seeessarr
hi everybody well i am trying to explore the WDT in LPC 2129. I am displaying a hex value through UART when WDT generates the interrupt. but iam not able to get interrupt . can any one tell me how to do this thanks
2005-06-21 by misstero
Hi, Please show your source code to do this. Suriyan. --- In lpc2000@yahoogroups.com, "seeessarr" <csr1981@r...> wrote:
> hi everybody > > well i am trying to explore the WDT in LPC 2129. > I am displaying a hex value through UART when WDT generates the > interrupt. > but iam not able to get interrupt . > can any one tell me how to do this > > thanks
2005-06-21 by chetan s rao
thanks Suriyan for ur response.
well i was able to get the interrupt from the WDT but i am not able to acknowledge the same i.e. when the watchdog interrupt occurred i displayed a value through UART.But the value was continuously displayed.
the source code is as follows:-
************************************************************
#define VICINTSEL (volatile unsigned int *)0XFFFFF00C
#define VICVECTADDR0 (volatile unsigned int *)0xFFFFF100
#define VICVECTCNTL0 (volatile unsigned int *)0xFFFFF200
#define VICINTEN (volatile unsigned int *)0xFFFFF010
#define VICVECTADDR (volatile unsigned int *)0xFFFFF030
#define WDMOD (volatile unsigned int *)0xE0000000
#define WDTC (volatile unsigned int *)0xE0000004
#define WDFEED (volatile unsigned int *)0xE0000008
#define WDTV (volatile unsigned int *)0xE000000C
extern UART(int);
void WDINT(void) __attribute__((interrupt("irq")));
main()
{
int i,j;
UART(0x111);
*VICVECTADDR0=(unsigned int)&WDINT;
*VICINTSEL=0X00000000; /*to enable each interrupt as IRQ*/
*VICVECTCNTL0=0X00000020; /*to control the WD interrupt i.e. 1st bit*/
*VICINTEN=0X00000001; /*to enable WD interrupt*/
*WDTC=0x00Cccc00;
*WDMOD=0x00000001;
*WDFEED=0xAA;
*WDFEED=0x55;
j=*WDMOD;
UART(j);
__asm__("MRS R0,CPSR"); /*ENABLING THE IRQ*/
__asm__("MVN R1,#0X80");
__asm__("AND R0,R0,R1");
__asm__("MSR CPSR,R0");
while(1);
}
void WDINT()
{
int k;
k=*WDMOD;
*WDMOD=0x01;
*WDFEED=0xAA;
*WDFEED=0x55;
UART(0x123);
*VICVECTADDR=0x00000000;
}
****************************************************************
thanks
and regards
Chetan
On Tue, 21 Jun 2005 misstero wrote :
>Hi,
>Please show your source code to do this.
>Suriyan.
>--- In lpc2000@yahoogroups.com, "seeessarr" <csr1981@r...> wrote:
>> hi everybody
>>
>> well i am trying to explore the WDT in LPC 2129.
>> I am displaying a hex value through UART when WDT generates the
>> interrupt.
>> but iam not able to get interrupt .
>> can any one tell me how to do this
>>
>> thanks
>Yahoo! Groups Links
>To visit your group on the web, go to:
>http://groups.yahoo.com/group/lpc2000/
>
>
>To unsubscribe from this group, send an email to:
>lpc2000-unsubscribe@yahoogroups.com
>
>
>Your use of Yahoo! Groups is subject to the
>Yahoo! Terms of Service
>.
>
[Non-text portions of this message have been removed]2005-06-21 by Steffen Rose
Hi, On Tuesday 21 June 2005 16:09, chetan s rao wrote: > well i was able to get the interrupt from the WDT but i am not > able to acknowledge the same i.e. when the watchdog interrupt > occurred i displayed a value through UART.But the value was > continuously displayed. I think you toggle the watchdog. This will restart the time measurements. After the next timeout you get a new interrupt. -- Steffen Rose