Example: Read Message from RXFIFO Using Interrupt Method

Zynq UltraScale+ Device Technical Reference Manual (UG1085)

Document ID
UG1085
Release Date
2023-12-21
Revision
2.4 English

The can.ISR[RXOK] and/or can.ISR[RXNEMP] bit fields can generate the interrupt.

1.Program the RXFIFO watermark level interrupt. Write to can.WIR[FW] to set the watermark can.ISR[RXFWMFLL] interrupt.

2.Proceed to step 3 when an interrupt is received.

3.Wait until a message is received. Read can.ISR[RXOK] or can.ISR[RXFWMFLL].

4.Read the message from the RXFIFO. Read all four of the registers (can.RXFIFO_ID, can.RXFIFO_DLC, can.RXFIFO_DATA1, and can.RXFIFO_DATA2).

5.Determine if RXFIFO is not empty. Read can.ISR[RXNEMP].

6.Repeat until the RXFIFO is empty.

7.Clear the interrupt.