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

Report SPI frequency accurately on Espressif #7963

Merged
merged 1 commit into from
May 11, 2023

Conversation

dhalbert
Copy link
Collaborator

Test on Metro ESP32-S2:

>>> import board
>>> s = board.SPI()
>>> s.frequency
250000
>>> s.try_lock()
True
>>> s.configure(baudrate=10)
>>> s.frequency
152
>>> s.configure(baudrate=100)
>>> s.frequency
152
>>> s.configure(baudrate=1000)
>>> s.frequency
1000
>>> s.configure(baudrate=100000)
>>> s.frequency
100000
>>> s.configure(baudrate=1000000)
>>> s.frequency
1000000
>>> s.configure(baudrate=10000000)
>>> s.frequency
10000000
>>> s.configure(baudrate=100000000)
>>> s.frequency
80000000
>>> s.configure(baudrate=123456)
>>> s.frequency
123456
>>> s.configure(baudrate=123888)
>>> s.frequency
123839

Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a TinyS2 and works fine. Thanks for the fix!

@gamblor21 gamblor21 merged commit 6b703ea into adafruit:main May 11, 2023
132 checks passed
@dhalbert dhalbert deleted the esp-spi-baudrate branch May 12, 2023 22:43
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

Successfully merging this pull request may close these issues.

SPI Frequency change limits not reflected on Espressif port
2 participants