I'm building a simple application using I2C to read sensor data (BNO055). I confirmed I2C and my sensor are all configured appropriately and working smoothly, but when I added in zephyr timers to my application to read the sensors, the application repeatedly crashes. I've confirmed that both I2C and the timers work as expected independently, but not when used together. Please see some sudo-code below:
static void repeating_timer_callback(struct k_timer *timer_id){
i2c_read_write(...);
...
}
K_TIMER_DEFINE(my_timer, repeating_timer_callback, NULL);
void main(){
...
...
k_timer_start(&my_timer, K_MSEC(100), K_MSEC(100));
}