Marco wrote:The timer callback is called in interrupt context. While in that timer callback the scheduler is blocked.
You could use gptPolledDelay() from within a thread like Giovanni suggested. This way the scheduler is able to preempt the i2c operation to do other stuff, like toggling your led.
This is missing the point, gpt was use to ensure precise timing, this cannot be achieved using a thread.... there is too much jitter.
Lets take a step back.....
This is what i'm tring to achieve:-
sampling of device on i2cbus @ 100hz with very little or no jitter.
cant use chibios i2c driver as it fails and locks up, so must be bit banged.