Hi, I am trying to cause an interrupt every 10msec, using TimerA0. I do not want to use the SDK. So, I initialzie the register using periphMemWrite: // counter enabled (CTRL) periphMemWrite (0x3e22, &ArchIO.TimerA.Channel0.ControlReg); // clear SCR2 reg - to enable interpt flag periphMemWrite (0x4001, &ArchIO.TimerA.Channel0.StatusControlReg); // compare value periphMemWrite (3200, &ArchIO.TimerA.Channel0.CompareReg1); In appconfig.H did the following: 1. defined Normal_ISR_34 as FTimer10msecIsr 2. defined GPR_INT_PRIORITY_34 as 1 But, the interrupts do not occur! WHY?? ANY help will is appriciated thanks, boaz The initialization was done according to the followings: Timer Control Register ------------------------- 001 = Count Mode, 1111 = Primary Count Source = IPBus clock divide by 128, 0 = Count repeatedly, 1 = Count until compare, then reinitialize, 0 = Count-up, 0 = NO Co-Init, 010 = Set OFLAG output on successful compare, Timer Status and Control Register ---------------------------------- 1 = TCFIE, inetrrupt ENABLE 0 = Timer Overflow Flag Interrupt DISABLED 0 = Timer Input Edge Flag Interrupt DISABLED 00 = Capture disabled 0 = Master Mode disabled 0 = Output DISABLED Timer Compare Register One (CMP1) ---------------------------------- CMP1 = 3200, Timer Load Register ---------------------------------- (Load Register = 0 at reset) ====== E N D ============= |
|
'826 - Creating 10msec Timer interrupts
Started by ●August 24, 2003
Reply by ●August 25, 20032003-08-25
--- In , "bmbmz123" <bmbmz123@y...> wrote: You must also setup the interrupt priority register "IPR" for that timer interrupt, otherwise it is masked. Rooteracer > Hi, > > I am trying to cause an interrupt every 10msec, using TimerA0. > I do not want to use the SDK. > So, I initialzie the register using periphMemWrite: > > // counter enabled (CTRL) > periphMemWrite (0x3e22, &ArchIO.TimerA.Channel0.ControlReg); > > // clear SCR2 reg - to enable interpt flag > periphMemWrite (0x4001, &ArchIO.TimerA.Channel0.StatusControlReg); > > // compare value > periphMemWrite (3200, &ArchIO.TimerA.Channel0.CompareReg1); > > In appconfig.H did the following: > 1. defined Normal_ISR_34 as FTimer10msecIsr > 2. defined GPR_INT_PRIORITY_34 as 1 > > But, the interrupts do not occur! WHY?? > ANY help will is appriciated > thanks, > boaz > > The initialization was done according to the followings: > > Timer Control Register > ------------------------- > 001 = Count Mode, > 1111 = Primary Count Source = IPBus clock divide by 128, > 0 = Count repeatedly, > 1 = Count until compare, then reinitialize, > 0 = Count-up, > 0 = NO Co-Init, > 010 = Set OFLAG output on successful compare, > > Timer Status and Control Register > ---------------------------------- > 1 = TCFIE, inetrrupt ENABLE > 0 = Timer Overflow Flag Interrupt DISABLED > 0 = Timer Input Edge Flag Interrupt DISABLED > 00 = Capture disabled > 0 = Master Mode disabled > 0 = Output DISABLED > > Timer Compare Register One (CMP1) > ---------------------------------- > CMP1 = 3200, > > Timer Load Register > ---------------------------------- > (Load Register = 0 at reset) > > ====== E N D ============= |
Reply by ●August 27, 20032003-08-27
Hi, You can find find an example of timer interrupt without the use of the SDK driver in the Examples folder of CodeWarrior 5.1: ...Program Files\Metrowerks\CodeWarrior\CodeWarrior Examples\M56826\isr_led\M56826.mcp Take a look at isr.c file. Best regards, Fabio Estevam -----Original Message----- From: bmbmz123 [mailto:] Sent: domingo, 24 de agosto de 2003 12:11 To: Subject: [motoroladsp] '826 - Creating 10msec Timer interrupts Hi, I am trying to cause an interrupt every 10msec, using TimerA0. I do not want to use the SDK. So, I initialzie the register using periphMemWrite: // counter enabled (CTRL) periphMemWrite (0x3e22, &ArchIO.TimerA.Channel0.ControlReg); // clear SCR2 reg - to enable interpt flag periphMemWrite (0x4001, &ArchIO.TimerA.Channel0.StatusControlReg); // compare value periphMemWrite (3200, &ArchIO.TimerA.Channel0.CompareReg1); In appconfig.H did the following: 1. defined Normal_ISR_34 as FTimer10msecIsr 2. defined GPR_INT_PRIORITY_34 as 1 But, the interrupts do not occur! WHY?? ANY help will is appriciated thanks, boaz The initialization was done according to the followings: Timer Control Register ------------------------- 001 = Count Mode, 1111 = Primary Count Source = IPBus clock divide by 128, 0 = Count repeatedly, 1 = Count until compare, then reinitialize, 0 = Count-up, 0 = NO Co-Init, 010 = Set OFLAG output on successful compare, Timer Status and Control Register ---------------------------------- 1 = TCFIE, inetrrupt ENABLE 0 = Timer Overflow Flag Interrupt DISABLED 0 = Timer Input Edge Flag Interrupt DISABLED 00 = Capture disabled 0 = Master Mode disabled 0 = Output DISABLED Timer Compare Register One (CMP1) ---------------------------------- CMP1 = 3200, Timer Load Register ---------------------------------- (Load Register = 0 at reset) ====== E N D ============= _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/motoroladsp More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/ |
Reply by ●August 28, 20032003-08-28
Hi, You can find find an example of timer interrupt without the use of the SDK driver in the Examples folder of CodeWarrior 5.1: ...Program Files\Metrowerks\CodeWarrior\CodeWarrior Examples\M56826\isr_led\M56826.mcp Take a look at isr.c file. Best regards, Fabio Estevam -----Original Message----- From: bmbmz123 [mailto:] Sent: domingo, 24 de agosto de 2003 12:11 To: Subject: [motoroladsp] '826 - Creating 10msec Timer interrupts Hi, I am trying to cause an interrupt every 10msec, using TimerA0. I do not want to use the SDK. So, I initialzie the register using periphMemWrite: // counter enabled (CTRL) periphMemWrite (0x3e22, &ArchIO.TimerA.Channel0.ControlReg); // clear SCR2 reg - to enable interpt flag periphMemWrite (0x4001, &ArchIO.TimerA.Channel0.StatusControlReg); // compare value periphMemWrite (3200, &ArchIO.TimerA.Channel0.CompareReg1); In appconfig.H did the following: 1. defined Normal_ISR_34 as FTimer10msecIsr 2. defined GPR_INT_PRIORITY_34 as 1 But, the interrupts do not occur! WHY?? ANY help will is appriciated thanks, boaz The initialization was done according to the followings: Timer Control Register ------------------------- 001 = Count Mode, 1111 = Primary Count Source = IPBus clock divide by 128, 0 = Count repeatedly, 1 = Count until compare, then reinitialize, 0 = Count-up, 0 = NO Co-Init, 010 = Set OFLAG output on successful compare, Timer Status and Control Register ---------------------------------- 1 = TCFIE, inetrrupt ENABLE 0 = Timer Overflow Flag Interrupt DISABLED 0 = Timer Input Edge Flag Interrupt DISABLED 00 = Capture disabled 0 = Master Mode disabled 0 = Output DISABLED Timer Compare Register One (CMP1) ---------------------------------- CMP1 = 3200, Timer Load Register ---------------------------------- (Load Register = 0 at reset) ====== E N D ============= _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/motoroladsp More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/ |