I have a task with I2C to read accelerometer data (acceleration, gyroscope, pedometer, etc). I'm trying to read the accelerometer and gyroscope every 10ms while only querying the pedometer every 1 second. So I allocated two events like so:
And I initialize them like so:
And I reset the triggers in each respective event handler with the same numbers.
Event Handler A
Event Handler B
However, both event handlers run ~1000ms apart every time. If I change Trigger 1 to evhSetupTimer1Trigger(1,10,2), both event handlers run at ~10ms intervals, always. Even if I attempt to change trigger 1 to 1000ms in the event handler. If I remove Event B entirely from the task, Event Handle A doesn't run at all. Why is this? Is it not possible to run two event triggers in the same task? Am I misunderstanding how to use the timers?
Note: I am using Timer 0 on another task which utilizes the Trigger 0, but that's on an entirely different task and I wouldn't expect it to affect this task.