I found a situation where the interaction between framework-arduinoteensy and FreeRTOS-Teensy causes issues, specifically when using I2C devices.
Both images are doing the same read from device call (specifically ina238.getCurrent_mA()). The first is on the arduino code on its own, and the second is within a task and the task scheduler is running.
It seems that the I2C functions call yield(); (here and here), which is intended to just handle some Serial events, but it seems that the freeRTOS library overrides that and adds a vTaskDelay, which delays the I2C transaction and causes performance issues.
What’s a good way to solve this?
P.S. Big shoutout to Daniel Fu for helping me dig into this.

