Skip to content

Trinket M0: No SPI pins in board #213

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

Closed
deshipu opened this issue Aug 30, 2017 · 6 comments
Closed

Trinket M0: No SPI pins in board #213

deshipu opened this issue Aug 30, 2017 · 6 comments
Assignees
Milestone

Comments

@deshipu
Copy link

deshipu commented Aug 30, 2017

Trying to run any of the SPI examples, I get:

>>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SCK'

Changing this to:

spi = busio.SPI(clock=board.D3, MOSI=board.D4, MISO=board.D2)

makes it work, but then I have to write board-specific code.

@deshipu deshipu changed the title trinket mo -- no SPI pins in board Trinket m0: No SPI pins in board Aug 30, 2017
@deshipu deshipu changed the title Trinket m0: No SPI pins in board Trinket M0: No SPI pins in board Aug 30, 2017
@tannewt tannewt self-assigned this Aug 30, 2017
@tannewt tannewt added this to the 2.0 milestone Aug 30, 2017
@tannewt
Copy link
Member

tannewt commented Aug 30, 2017

How does it work when there is no chip select line? Isn't that usually used to signify transaction boundaries?

@deshipu
Copy link
Author

deshipu commented Aug 30, 2017

No idea, honestly, but it works. It would be nice to have those pin names in the board module, though.

@tannewt
Copy link
Member

tannewt commented Aug 30, 2017

I hesitate to add the pin names because most SPI devices won't work due to no pin for the chip select.

@deshipu
Copy link
Author

deshipu commented Aug 30, 2017

Any pin can be specified as chip select, and it's the driver for the particular device that is responsible for toggling it.

@deshipu
Copy link
Author

deshipu commented Aug 30, 2017

I really have no idea about how the chip select line is related to this issue at all.

@tannewt
Copy link
Member

tannewt commented Aug 31, 2017

I was confusing the Gemma which has 3 GPIO with the Trinket which has enough for SPI. Pull request proposed with the names.

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

No branches or pull requests

2 participants