Skip to content

Conversation

@sparks
Copy link
Contributor

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-devme-no-dev merged commit cc73f17 into espressif:masterMay 5, 2017
Sign up for freeto 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

@sparks@me-no-dev