Teensy 3.6 ethernet rx interrupt
Hello
I have trouble getting the k66 ethernet rx interrupt to trigger.
i am activating the interrupt and interrupt mask:
the ring buffer is set to allow interrupt:
the interrupt function is set:
and the interrupt vector i activated:
this triggers no interrupts....
NVIC_TRIGGER_IRQ(IRQ_ENET_RX); will trigger a interrupt
and replacing IRQ_ENET_RX with IRQ_ENET_ERROR
you get a interrupt befor every mdio_read
source: https://github.com/alex-Arc/k66_ethernet/tree/interrupt
Hello
I have trouble getting the k66 ethernet rx interrupt to trigger.
i am activating the interrupt and interrupt mask:
Code:
ENET_EIR = ENET_EIR_RXF;
ENET_EIR = ENET_EIR_RXB;
ENET_EIMR = ENET_EIRM_RXF | ENET_EIRM_RXB;
the ring buffer is set to allow interrupt:
Code:
for (int i=0; i < RXSIZE; i++) {
rx_ring[i].flags.all = 0x8000; // empty flag
rx_ring[i].moreflags.all = 0x80; // set Interrupt true
rx_ring[i].buffer = rxbufs + i * 128;
}
the interrupt function is set:
Code:
void rxIRQ(void){
Serial.println("........Interrupt........");
interruptFlag++;
ENET_EIR = ENET_EIR_RXF;
ENET_EIR = ENET_EIR_RXB;
}
and the interrupt vector i activated:
Code:
attachInterruptVector(IRQ_ENET_RX, rxIRQ);
NVIC_IS_ACTIVE(IRQ_ENET_RX);
NVIC_ENABLE_IRQ(IRQ_ENET_RX);
__enable_irq();
this triggers no interrupts....
NVIC_TRIGGER_IRQ(IRQ_ENET_RX); will trigger a interrupt
and replacing IRQ_ENET_RX with IRQ_ENET_ERROR
you get a interrupt befor every mdio_read
source: https://github.com/alex-Arc/k66_ethernet/tree/interrupt
Last edited: