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

drivers: spi_bitbang: Fix timing in SPI bitbang driver #72813

Merged
merged 1 commit into from
May 27, 2024

Conversation

joerchan
Copy link
Contributor

Fix timing in SPI bitbang driver.
The issue occurs with CPHA=1 when the input data is changed immediately after the clock shift on the last bit of the read. Because we read the input bit after changing the clock, this bit becomes invalid.
Instead of doing wait, clock-change, read. Do wait, read, clock-change.

Fix timing in SPI bitbang driver.
The issue occurs with CPHA=1 when the input data is changed immediately
after the clock shift on the last bit of the read.
Because we read the input bit after changing the clock, this bit
becomes invalid.
Instead of doing wait, clock-change, read. Do wait, read, clock-change.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
@joerchan
Copy link
Contributor Author

@tbursztyka Do you have anyone that can give this a second approval?

@carlescufi carlescufi merged commit 3ad57e3 into zephyrproject-rtos:main May 27, 2024
24 checks passed
@joerchan joerchan deleted the fix-spi-bitbang-timing branch May 27, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants