-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Improve resolution of mp_hal_delay_ms() to subticks. #10315
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
Conversation
o broadcom: return subticks o cxd56: return subticks only when pointer is non-null o litex: zero subticks, port is accurate only to ticks o raspberrypi: correct subtick calculation
Test on Raspberry Pi Pico 2:
Test on Adafruit Metro ESP32-S3:
Accuracy now within 1 subtick (1/32768 sec = ~30.5 us). |
|
o Test for console interrupt during RUN_BACKGROUND_TASK o Handle signedness of remaining tick/subtick values correctly for very large delays o Improve comments
Ready for review. The ESP32-S3 failure was a typo in the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One API comment. Looks great otherwise. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Improves resolution of mp_hal_delay_ms() from ticks (1/1024 sec.) to subticks (1/32768). This PR also corrects port_get_raw_ticks() for these ports: