- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem is solved. Timer Interval is working pretty well. Problem is my messurement.
I use the interrupt timer as an periodic irq. My problem is, that the number of interrupt differ from run to run(Run takes always 10s. Its also a very huge difference(From 80k to 100k interrupts/10s -> 8k to 10k irqs/s Where is the bug? Here my config: IOWR(TIMER_BASE,1,(1<<3) | (1 << 1) |(1 << 0) );//Stop Timer, IRQ enable, counter continue when getting 0 IOWR(TIMER_BASE,0,0); // Clear TO Bit(Reaching 0) IOWR(TIMER_BASE,2,(alt_u16)(10000-1)); // Interrupt Time will rise every 100µs IOWR(TIMER_BASE,3,(alt_u16)( (10000-1) >> 16 )); alt_irq_register(1, NULL, timer_interrupt); //Register Interrupt IOWR(TIMER_BASE,1,(1<<2) | (1 << 1) | (1 << 0) );//Start Timer, IRQ enable, Continuous enable I got a main loop like this while(10s) { } ISR: static void timer_interrupt(void* context, alt_u32 id){ IOWR(TIMER_BASE,0,0); //Clear TO(timeout) bit) interrupts++; ... } Prototypes: ... static void timer_interrupt(void* context, alt_u32 id); int alt_irq_register (alt_u32 id,void* context,void (*isr)(void*, alt_u32)); ... Interval Timer clock is running at 100MhzLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page