This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU branch Bootloader when TWI is busy

Hi,

I have a application where the TWI is always reading a sensor in the main task.

When the DFU requiere to reset, frequently the TWI is busy and the current frame is broken !

When the application restart after the flash update, TWI can't read the sensor, the sensor is never responding !

What is the solution to wait the end of the TWI frame, before restart the MCU ? The difficulty is that the DFU request is in IRQ, and the TWI is in main thread !

Regards,

Related