Page 1 of 1

Using coreTimerService with callback functions that use i2c

Posted: Tue Mar 29, 2016 4:38 am
by lopezr
So i'm working on this project that requires me to have sample rate of 100 Hz. I'm using an IMU and is communicated with a Max32 microcontroller via i2c. This project also include writing the data sampled onto an SD card. I understand that it takes a while to write anything to an SD card because of how its being written into. I figured I could just attach a coreTimerService that would run ever 10ms to read the data off the sensors, but every time I try to attach the callback function to the timer interrupt, the code stops. I have tested everything before i tried moving to coreTimerService. I've used millis() to check how long it takes to read the data from the sensors and it takes 2ms. Is this too long for a coreTimerService?