Skip to content

the SPI implementation does not support channel select pins other than pin 10 (PB2) #328

Answered by Rahix
mutantbob asked this question in Q&A
Discussion options

You must be logged in to vote

I think you've misunderstood how the Spi bus driver is meant to be used.

First of all, the chip select pin you pass to the constructor does not need to be used as a CS pin. In fact, CS management is meant to be handled entirely outside the Spi bus driver. The reason you have to pass the CS pin to the constructor (and then receive it back) is that the hardware requires the pin to be an output. If it is not, the spi peripheral does not actually work - it will switch to slave mode instead of operating as bus master. You can read up more on this in issue #27. Again, this is the only reason for passing this pin to the constructor at all.

Now, to actually do chip select operation, peripheral dr…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Rahix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #252 on September 02, 2022 10:55.