tomek
Guest
|
Posted:
Sun Dec 11, 2005 5:15 pm Post subject:
HW interrupt problem |
|
|
hi,
can anybody tell me what is wrong with my code for dsk6416, please.
i'm expecting LED1 to blink every second(500ms on, 500ms off), by using H
interrupts.
in dsp/bios configuration -> HW InterruptServiceRoutineManager i se
timer1 as the interrupt source for HWI_INT15 and set function _tm1 to b
called.
the result is, that the function tm1() is called only once and that's it.
i can get blinking of LED3 by using prd1() with PeriodicFunctionManager
but as soon as i start timer1 with TIMER_start(hTimer1); it is not workin
anymore.
can anybody explain to me what is the problem?
#include "dsk6416.h"
// variable declaration
static TIMER_Handle hTimer1;
Uint32 Timer1Control = TIMER_CTL_RMK(
TIMER_CTL_INVINP_DEFAULT,
TIMER_CTL_CLKSRC_CPUOVR8, // Internal clock...
TIMER_CTL_CP_DEFAULT,
TIMER_CTL_HLD_DEFAULT,
TIMER_CTL_GO_DEFAULT,
TIMER_CTL_PWID_DEFAULT,
TIMER_CTL_DATOUT_DEFAULT,
TIMER_CTL_INVOUT_DEFAULT,
TIMER_CTL_FUNC_DEFAULT
);
Uint32 tm = 0;
void main()
{
CSL_init();
DSK6416_init();
DSK6416_LED_init();
hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
TIMER_configArgs(hTimer1,
Timer1Control,
37500000,
0x00000000
);
IRQ_nmiEnable();
IRQ_globalEnable();
IRQ_reset(IRQ_EVT_TINT1);
IRQ_disable(IRQ_EVT_TINT1);
IRQ_clear(IRQ_EVT_TINT1);
IRQ_enable(IRQ_EVT_TINT1);
TIMER_start(hTimer1);
}//end main()
void prd1()
{
DSK6416_LED_toggle(3);
}//end prd1()
void tm1()
{
tm++;
DSK6416_LED_toggle(1);
}//end tm1 |
|