You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use counter_set_channel_alarm to set counter alarm value and change GPIO output level in callback function.
But I found that the interval between the output level changes have a slightly different (around 0 - 15us) everytime, which is unacceptable for my program.
Is it because the kernel is doing something before callback function runs? How can I do to make the output interval run as I expected?
The counter is 1Mhz (1us). This is part of how I setup the output.
//esp32c3_devkitm
&timer0 {
status = "ok";
label = "PPM Timer";
prescaler = <80>;
group = <0>;
index = <0>;
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I use
counter_set_channel_alarm
to set counter alarm value and change GPIO output level in callback function.But I found that the interval between the output level changes have a slightly different (around 0 - 15us) everytime, which is unacceptable for my program.
Is it because the kernel is doing something before callback function runs? How can I do to make the output interval run as I expected?
The counter is 1Mhz (1us). This is part of how I setup the output.
The minimum interval I run between level changes is 300us. When I use logic analyzer to read the output, it's not alaways accurate 300us.
OS: zephyr 3.4.0
Toolchain: zephyr-sdk-0.16.0
Board: esp32c3_devkitm
Beta Was this translation helpful? Give feedback.
All reactions