 ADUC7024 IRQ not working properly Jon Ellis I am trying to build a counter using an ADUC7024. Basically I want Timer0 to cause a global interrupt every 10ms. Timer1 should be counting my input TTL pulses. Every time it interrupts, I want the DAC to output a voltage proportional to the number of counts on Timer1 in that 10ms period. Here is my counter.c file
#include<ADuC7024.h>
void IRQ_Handler(void) ;
int main (void) {
T0LD = 0x3FC0; // Counter Value
T0CON = 0xC8;
// Enabled,Periodic,Binary and CLK/256
T1LD = 0x00000000;
// Load zero to timer one initial value
T1CON = 0x00000780;
// Enabled,count P0.6
IRQ = IRQ_Handler;
// Specify Interrupt Service Rountine
IRQEN = RTOS_TIMER_BIT; // Enable Timer0 IRQ
DAC0CON = 0x13;
DAC0DAT = 0x0FFF0000;
while (1)
{
}
}
void IRQ_Handler(void)
{
DAC0DAT = T1VAL << 16;
T1CON ^= 0x00000040;
T1CON ^= 0x00000040;
if ((IRQSTA & 0x00000004) != 0) // Timer0 IRQ?
{
GP4DAT ^= 0x00040000;// Complement P4.2
DAC0DAT = T1VAL << 16;
T0CLRI = 0x1; // Clear Timer IRQ
IRQCLR = 0x00000004;
}
return ;
}
And I am using the default ADUC702x.s file. I know I need to change something with the IRQ Handlers but I don't know what. I've checked the boards and can't find anything usable for me. Now the problem I'm getting is as my response when I build it. Build target 'ADuC7024 Flash' assembling ADuC702x.s... compiling counter.c... linking... .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol DAbt_Handler (referred from aduc702x.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol FIQ_Handler (referred from aduc702x.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol PAbt_Handler (referred from aduc702x.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol Undef_Handler (referred from aduc702x.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol IRQ (referred from counter.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_irq_ack_lock (referred from rt_hal.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol tsk_unlock (referred from rt_hal.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_stackinfo (referred from rt_hal.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_stk_overflow (referred from rt_hal.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_tmr_force_irq (referred from rt_system.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_tmr_inspect_cnt (referred from rt_system.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_tmr_inspect_ovf (referred from rt_system.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol m_tmr (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol mp_stk (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol mp_stk_size (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol mp_tcb (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol mp_tcb_size (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol mp_tmr_size (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_active_TCB (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_idle_demon (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_maxtaskrun (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_rrobin (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_tmr_init (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol tsk_lock (referred from rt_task.o). .\Flash\Counter_Test.axf: Error: L6218E: Undefined symbol os_tmr_call (referred from rt_timer.o). Target not created Can anyone help? email is j.d.ellis@tudelft.nl |