I am working on a project with the FRDM-KE06Z using MCUXpresso IDE and SDK 2.4.1 where I must receive CAN messages of multiple message IDs. First, the documentation generated for the SDK built with the SDK generator for this device did not include anything on the MSCAN driver. So I'm looking at the KE06 Sub-Family Reference Manual, Rev 3, July 2016.
In the reference manual it appears that I want my MSCAN call-back function to check the RXF flag (pages 610, 640, and 652) in the MSCAN_CANRFLG field to determine if there is a message ready to read from the foreground of the receiver FIFO. Specifically, in section 32.4.4 it says my receive handler must read the received message and reset the RXF flag when it is set.
When I look in the CAN driver source for the MCUXpresso SDK, the driver example projects that came with the SDK are using kStatus_MSCAN_RxIdle state in the the handler to determine if a message is available.
I see the MSCAN_GetRxBufferFullFlag and MSCAN_ClearRxBufferFullFlag functions in the MSCAN driver source, but I wonder if the driver examples are achieving the same thing as using these functions or is there an advantage over using one way or the other?