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

RP2040: set initial SPI frequency #5987

Merged
merged 1 commit into from Feb 7, 2022

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Feb 7, 2022

Tested on QT Py RP2040:

>>> import busio,board
>>> spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
>>> print(spi.frequency)
250000
>>> spi.try_lock()
True
>>> spi.configure(baudrate=200000)
>>> print(spi.frequency)
244140
>>> spi.configure(baudrate=250000)
>>> print(spi.frequency)
250000
>>> spi.configure(baudrate=25000)
>>> print(spi.frequency)
27126

@dhalbert dhalbert requested a review from tannewt February 7, 2022 22:10
@dhalbert dhalbert merged commit 5afd7d4 into adafruit:main Feb 7, 2022
@dhalbert dhalbert deleted the fix-rp2040-spi-freq-init branch February 10, 2022 21:23
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.

RP2040 busio.SPI() fails to note initial SPI frequency
2 participants