Skip to content

STM32: Allow simplex SPI #2459

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
Jan 9, 2020
Merged

STM32: Allow simplex SPI #2459

merged 3 commits into from
Jan 9, 2020

Conversation

hierophect
Copy link
Collaborator

This PR changes the pin search algorithm to allow for the exclusion of MOSI or MISO on the SPI bus. Resolves #2309.

Tested for crashes and initializations, but unfortunately I don't have any SPI devices on hand with libraries that allow the exclusion of either pin, so that would be a beneficial extra test.

@hierophect hierophect requested review from ladyada and tannewt January 7, 2020 18:23
@hierophect hierophect added the stm label Jan 7, 2020
@tannewt tannewt requested review from jepler and removed request for tannewt and ladyada January 7, 2020 20:07
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

hi ! Please take this review with a grain of salt as I'm new(ish) at reviewing PRs for Adafruit. But, I think some improvements can be made.

@hierophect hierophect requested a review from jepler January 8, 2020 15:54
@jepler
Copy link

jepler commented Jan 9, 2020

Testing performed: On a feather stm32, I used a test program to exercise duplex, in-only, and out-only SPI. write, readinto, and write_readinto worked properly in each case where they should be applicable. I scoped clock and MOSI, and hooked MISO to GND and 3.3v to observe that correct values were input.

I did notice that a short (.5us) pulse would occur on MOSI during SPI construction (or maybe activation via do_lock()) but this is almost certainly preexisting and seems like it would have no impact (no errant pulses seen on SCK)

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the requested changes, especially the coding style items!

@jepler jepler merged commit d7c6d9c into adafruit:master Jan 9, 2020
@hierophect hierophect deleted the stm32-spi-oneline branch February 29, 2020 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32: allow omitting MOSI or MISO in SPI
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy