Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect pwm duration capture method #4

Open
skotopes opened this issue Sep 5, 2023 · 0 comments
Open

Incorrect pwm duration capture method #4

skotopes opened this issue Sep 5, 2023 · 0 comments

Comments

@skotopes
Copy link

skotopes commented Sep 5, 2023

furi_get_tick gives extremely unreliable value for any time computation.

There are at least 3 different ways to capture PWM duration:

  • hardware timer with capture compare channel. Precise.
  • Interrupt + DWT or hardware timer. Acceptable.
  • Polling in disable irq mode. Acceptable, but going to cause system lockup.

Also this sensor supports UART, which solves all problems.
I've made uart implementation that you can use in your project https://github.com/skotopes/flipperzero_mhz19_uart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant