The following steps can be used to setup and control the TXFIFO watermark interrupt. See This Figure. The watermark status and control interrupts are described in the Protocol Engine section.
1.Disable the TXFIFO watermark interrupt. Write a 0 to can.IER[13].
2.Program the TXFIFO empty watermark level. Write to can.WIR[EW].
3.Clear the TXFIFO watermark interrupt. Write a 1 to can.ICR[13].
4.Read the TXFIFO watermark status. Read can.ISR[13].
5.Enable the TXFIFO watermark interrupt. Write a 1 to can.IER[13].