I'm using RTOS and timers simultaneously. There is a problem unfortunately.
One of the tasks has to read a digital sensor while two timers via proper interrupts are generating PWM pulses. The received value from the sensor is not correct when interrupts are active. On the other hand, when I disable the interrupts while reading the sensor, the generated PWM pulses are not correct. In fact, they can't work together.
Let me know if there is a solution for this problem.
Thanks
jeremiah
Joined: 20 Jul 2010 Posts: 1358
Posted: Thu Sep 09, 2021 12:01 pm
Can you make a quick small program with just the RTOS, your interrupts, and read the sensor. Make sure the example compiles and fails like you expect it to. Post it here using the CODE tags.
We don't need all your code, just the code that causes a problem.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum