Skip to content

add CPOL setting #1781

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 3 commits into from
Mar 23, 2016
Merged

add CPOL setting #1781

merged 3 commits into from
Mar 23, 2016

Conversation

reiyawea
Copy link
Contributor

Add CPOL setting thus supporting SPI MODE 2&3.

@reiyawea reiyawea closed this Mar 19, 2016
@reiyawea reiyawea reopened this Mar 19, 2016
@igrr igrr merged commit 1f87e79 into esp8266:master Mar 23, 2016
@reiyawea
Copy link
Contributor Author

reiyawea commented Apr 3, 2016

Sorry for replying so late. It's difficult to access gmail here.
First, a search on bing gives that setting bit 29 in SPI_PIN register will
make CPOL=1. (See: http://bbs.espressif.com/viewtopic.php?t=1570)
It seems to be a different register naming system. Then I reviewed the
codes of other ESP8266 projects and find that one of them uses the same
naming system. It's called NodeMCU.
By matching the absolute address I found that SPI1P here is the same
register as SPI_PIN there.
I lit up a VFD module with the modified code which uses SPI MODE2 and
succeeded.
I hope it helps.

2016-03-27 5:42 GMT+08:00 0xPIT [email protected]:

I've tested just now with my logic analyzer. Unfortunately, it does not
work.
I've also tried all modes (0,1,2,3) and SCK always idles in low state,
whereas with CPOL=1 (in modes 2 & 3) it should idle at high.

Where did you find the info about bit 29 in SPI1P is setting CPOL?


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#1781 (comment)

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