what is the right way to identify whether the active CAN interrupt on LPC43xx is caused by message transmission or reception if I do not want to or can't keep track of which message object is used for tx/rx?
Then I can read the status register using Chip_CCAN_GetStatus (LPC_CCAN_T *pCCAN) and use the TXOK and RXOK bits to detect if the interrupt was triggered by transmission or direction; however, both of these bits could be 1 at the same time which would prevent the direction identification.
The other way I can think of would be using the Chip_CCAN_GetMsgObject function and then reading the DIR bit of the IFx_ARB2 register.
Is there any more elegant way? E.g. would it be possible to use the ND1/2 registers?
Thanks in advance for any ideas / clarification