Emandhal / MCP251XFD

MCP2517FD, MCP2518FD and MCP251863 driver
MIT License
28 stars 6 forks source link

Spurious TBC Overflow IRQ #11

Closed mickeyl closed 7 months ago

mickeyl commented 7 months ago

First off, thanks a lot for this great library. I'm making good progress with integrating it into an ESP32(S3) project using ESP-IDF.

Perhaps this is more an MCP question rather than your library, but it is hard to find any information beyond datasheets and existing drivers.

I'm writing my IRQ service routine for pin /INT and I found that although I have only enabled RX events as per

        .SysInterruptFlags = MCP251XFD_INT_RX_EVENT,

I'm receiving an IRQ for MCP251XFD_TBC_OVF_INTERRUPT.

Since this is not related to the RX FIFO, I wonder whether it's a configuration bug in your library or whether I'm doing anything wrong.

mickeyl commented 7 months ago

I have just seen that MCP251XFD_ConfigureTimeStamp enables said IRQ, if you request it via interruptBaseCounter. All is working inside normal parameters. Sorry for the noise!