Skip to content

issue #536 CPX change SPI pin designations to externally available pins #540

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 2 commits into from
Jan 23, 2018
Merged

Conversation

brentru
Copy link
Member

@brentru brentru commented Jan 19, 2018

Reassigned A1, A2, A3 to MOSI/MISO/SCK. Removed FLASH_CS.
#536

@brentru brentru requested a review from dhalbert January 19, 2018 22:30
@dhalbert
Copy link
Collaborator

Oops, that particular assignment doesn't work due to the limited pad assignments on the SERCOM:

>>> spi = busio.SPI(clock=board.A3, MOSI=board.A1, MISO=board.A2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: MOSI and clock pins incompatible

This is what works and doesn't work (copied from REPL trials):

>>> spi = busio.SPI(clock=board.A3, MOSI=board.A2, MISO=board.A1) #OK
>>> spi = busio.SPI(clock=board.A1, MOSI=board.A3, MISO=board.A2) #OK
>>> spi = busio.SPI(clock=board.A1, MOSI=board.A2, MISO=board.A3)  # incompatible
>>> spi = busio.SPI(clock=board.A3, MOSI=board.A1, MISO=board.A2)  # incompatible
>>> spi = busio.SPI(clock=board.A2, MOSI=board.A1, MISO=board.A3)  # incompatible (A2 can't be clock)
>>> spi = busio.SPI(clock=board.A2, MOSI=board.A3, MISO=board.A1)  # incompatible (A2 can't be clock)

@ladyada, do you have a preference? No silkscreen now but there may be in the future. Also may need to consider another possible microcontrollers in same form factor (though that's mostly a routing issue).

@dhalbert dhalbert changed the title issue #536 CPX issue #536 CPX change SPI pin designations to externally available pins Jan 19, 2018
@ladyada
Copy link
Member

ladyada commented Jan 19, 2018

we wont be putting the silkscreen for SPI onto the CPX, and on the classic, SPI isnt exposed, so....use any pins ya like (other than A0 of course :)

@brentru
Copy link
Member Author

brentru commented Jan 22, 2018

@dhalbert Ok - switched pin assignments to mirror your second trial on the REPL.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Great! Thanks. We'll need to update the Learn Guide later to mention this when 3.0 comes out.

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.

3 participants