4.4.3 Interrupt and Polling Mode

In the interrupt mode of a driver, the driver state machine (or task routine) runs from the interrupt service routine. However, in polling mode, the driver state machine runs from a while(1) loop. The interrupt mode of drivers provides the best responsiveness where the polling mode is good for debugging purposes.

MPLAB Harmony v2 supports both interrupt and polling modes of drivers. However, MPLAB Harmony v3 supports only interrupt mode (except for a few drivers which are not associated with peripheral interrupts and runs their state machine from the while(1) loop, such as the memory driver, and SDSPI driver). Any MPLAB Harmony v2 applications which use the polling mode of a driver, must use the interrupt mode of the driver in MPLAB Harmony v3. However, changing from polling mode to interrupt mode, does not demand any change in the application. Whatever changes are needed in the system and interrupt files, are done by the MCC code generation.