Skip to content

SPI_MODE2 and SPI_MODE3 configurations inverted #345

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

Merged
merged 1 commit into from
May 5, 2017
Merged

SPI_MODE2 and SPI_MODE3 configurations inverted #345

merged 1 commit into from
May 5, 2017

Conversation

sparks
Copy link
Contributor

@sparks sparks commented May 1, 2017

It appears that the configurations for ck_out_edge were inverted for SPI_MODE2 and SPI_MODE3. You can check the technical reference manual on page 76, table 23 "Clock Polarity and Phase, and Corresponding SPI Register Values for SPI Master".

screen shot 2017-05-01 at 15 59 44

I've check with my oscilloscope that the current configuration is wrong and this fix corrects the issue.

Here are some examples writing 0x8F with the SCK line in red and the MOSI line in yellow

SPI_MODE2 before the change:
spi_mode2_before

SPI_MODE2 after the change:
spi_mode2_after

SPI_MODE3 before the change:
spi_mode3_before

SPI_MODE3 after the change:
spi_mode3_after

It appears that the configurations for `ck_out_edge` were inverted for `SPI_MODE2` and `SPI_MODE3`. You can check the technical reference manual on page 76, table 23 "Clock Polarity and Phase, and Corresponding SPI Register Values for SPI Master".

I've check with my oscilloscope that the current configuration is wrong and this fix corrects the issue.
@me-no-dev me-no-dev merged commit cc73f17 into espressif:master May 5, 2017
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.

2 participants