Hallo Leute, ich habe eine Komponente (miniuart) in mein QSYS-NIOS II-System eingefügt, der mir ein Interrupt erzeugt. Soweit funktioniert dieser Core auch. Nun möchte ich noch den Interrupt in der Software registrieren. So ist derzeit mein Versuch:
1 | volatile int mini_uart=0; |
2 | |
3 | :
|
4 | |
5 | static void MINIUART_interrupt(void* context, alt_u32 id) |
6 | {
|
7 | alt_putstr("MINIUART IR AUFGETRETEN!!!\n"); |
8 | alt_putstr("\n"); |
9 | }
|
10 | |
11 | :
|
12 | |
13 | void* mini_uart_ptr = (void*) &mini_uart; |
14 | |
15 | alt_ic_isr_register(MINIUART_0_IRQ_INTERRUPT_CONTROLLER_ID, MINIUART_0_IRQ, MINIUART_interrupt, mini_uart_ptr, 0x0); |
16 | |
17 | alt_ic_irq_enable(MINIUART_0_IRQ_INTERRUPT_CONTROLLER_ID, MINIUART_0_IRQ); |
18 | |
19 | :
|
Jedoch funktioniert das nicht richtig. Es wird ständig ein IR erzeugt. Muss ich den Interrupt anders registrieren? Was mach ich falsch? Gruß: HAnz