Gast
#2179235
Hallo, ich bin relativ neu in NIOS und versuche grad eine blinkende LED mit einem TimerInterrupt zu realisieren. Jedoch klappt das nicht so wie das soll :) Vielleicht hat ja wer eine Ahnung wo das Problem sein könnte. static void timer_interrupts(void* context, alt_u32 id) { IOWR_ALTERA_AVALON_TIMER_STATUS(TIMER_BASE, 0); } int main() { alt_irq_register(TIMER_IRQ, NULL, timer_interrupts); while(1) { IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER_BASE, 0x00ff); IOWR_ALTERA_AVALON_TIMER_PERIODH(TIMER_BASE, 0x00); IOWR_ALTERA_AVALON_PIO_DATA(LED_BASE, 0x01); } } Wobei mein Timer eine Periode von 10 ms hat. Würde mich über Hilfe freuen :) Grüße, Thom