Before designing an application, one needs to decide whether or not to poll mailboxes for received messages, or use the CAN receive interrupt. The polling method is slower, but allows one to decide exactly when to receive data. The interrupt method is faster and lessens the risk of missing data that arrives too fast for the polling to detect. The first bullet in the figure shows polling; one must regularly check for messages. The quickest way to take care of incoming data from the CAN bus is to have a receive interrupt routine take care of it. If CAN interrupts are enabled, the CAN receive interrupt service routine is called automatically. The interrupt should copy the data to a buffer, so it is safe from overwrites from newer CAN data, and set a flag with which the main application is notified to later take care of the buffer.