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: spi_pico_pio: Add support for SPI mode 1 (CPOL=0, CPHA=1) #85034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TerryGeng
Copy link
Contributor

By including another PIO program with the side-set pin polarity inverted.

Tested on ADS124S06 ADC, which supports only SPI mode 1 (CPOL=0, CPHA=1).

/* .wrap_target */
0x6021, /* 0: out x, 1 side 0 */
0xb101, /* 1: mov pins, x side 1 [1] */
0x4001, /* in pins, 1 side 0 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

0x4001,   /* 2: in ......

By including an other PIO program with the side-set pin polarity inverted.

Signed-off-by: Terry Geng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants