The best solution, at least in my situation, would be such RTOS configuration where high priority threads/tasks actually could interrupt or temporarily stop lower priority hardware events from firing. I do not mind if tested communication slows down a bit, I do not worry about loosing events. Those I2C events are level-triggered so STM32 NVIC will keep triggering them again and again until they are handled and corresponding event flag is reset or some other condition is met. Otherwise, I think I have to implement some throttle - e.g. disable I2C events every 1ms for a moment to let RTOS do its stuff, but does not it sound odd? Intuition tells me that there should be a better way.