How to delay() by milliseconds / microseconds on the PIC32
First, useĀ MPLab Harmony Configurator 3to enable the CORETIMERmodule for your project. No special configuration is neccessary.
After that, use
CORETIMER_DelayMs(uint32_t delay_ms)
to delay for a given number of milliseconds or use
CORETIMER_DelayUs(uint32_t delay_us)
to delay for a given number of microseconds.