mfrc522 icon indicating copy to clipboard operation
mfrc522 copied to clipboard

Why shouldn't we use PIN24 as the NSS pin?

Open ccb23 opened this issue 6 years ago • 3 comments

https://github.com/japaric/mfrc522/blob/40ffdb4e0f14cc47c3585e796f0d63218cdf7916/examples/rpi.rs#L5

ccb23 avatar Jul 12 '19 21:07 ccb23

I do not get your advice: Why is it important not to use PIN24 as NSS pin?

ccb23 avatar Jul 12 '19 22:07 ccb23

PIN24 is a Chip Select pin triggered by the SPI driver itself. With SPI, whenever you want to exchange data, you have to signal to a chip you want to talk to it through this.

I assume there is something wrong or broken somewhere with the standard behavior of this pin - if I try using pin 24 as Chip Select (effectively ignoring whatever pin I gave this library, and instead using the automatic chip select), this library stops working.

fridtjof avatar Oct 04 '19 02:10 fridtjof

I fixed this a long time ago in https://github.com/japaric/mfrc522/pull/10, by the way.

fridtjof avatar Jun 11 '20 01:06 fridtjof