Skip to content

Commit 7e4d147

Browse files
committed
docs: update mfrc522 reader doc
1 parent ac5b66c commit 7e4d147

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

documentation/developers/rfid/mfrc522_spi.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,34 @@ are just routed through to spidev. Have a look at the spidev
1717
documentation for details if you really want to use a different SPI bus.
1818
The default setup makes most sense for almost everyone.
1919

20-
### spi_bus *(default=0)*
20+
### spi_bus *(0)*
2121

22-
The SPI Bus ID. The default bus is 0. For other bus IDs, the RPi also needs to re-configured. For that reason we set this to zero.
22+
The SPI Bus ID. Fixed to 0, because other bus IDs also need re-configuration of the RPi (refer to RPi documentation).
2323

2424
### spi_ce *(default=0)*
2525

26-
SPI chip enable pin. On default SPI bus 0, this can be
26+
The SPI Chip Select (CEx) pin. Mandatory.
2727

28-
- 0 = GPIO8 (Pin 24)
29-
- 1 = GPIO7 (Pin 26)
28+
This can be
29+
- 0 = GPIO8 (SPI0 CE0) - Pin 24
30+
- 1 = GPIO7 (SPI0 CE1) - Pin 26
3031

31-
For other SPI buses refer to RPi documentation.
32+
For other SPI buses
3233

33-
### pin_irq
34+
### pin_irq *(default=24)*
3435

35-
Mandatory IRQ pin. This can be any GPIO pin.
36+
The IRQ GPIO pin for card detection. This is an optional pin, but required for interrupt-driven card detection.
3637

37-
### pin_rst *(default=0)*
38+
If not used,
39+
- uses pollig mode instead of interrupt event
40+
- has high CPU usage and may impact system performance!
41+
- Only use this mode if you have serious interrupt conflicts
3842

39-
Reset pin for hardware reset. This is an optional pin. If not used,
43+
### pin_rst *(default=25)*
4044

45+
The Reset GPIO pin for hardware reset. This is an optional pin.
46+
47+
If not used,
4148
- hardware reset will only be performed by power-on-reset. This has been tested and works fine.
4249
- you **must** tie the reset pin of the MFRC522 board **high**!
4350

@@ -59,14 +66,16 @@ The following pin-out is for the default SPI Bus 0 on Raspberry Pins.
5966

6067
### MFRC522 default wiring (spi_bus=0, spi_ce=0)
6168

62-
|Pin Board Name |Function |RPI GPIO |RPI Pin |
63-
|----------------|----------|----------|---------|
64-
|SDA |CE |GPIO8 |24 |
65-
|SCK |SCLK |GPIO11 |23 |
66-
|MOSI |MOSI |GPIO10 |19 |
67-
|MISO |MISO |GPIO9 |21 |
68-
|IRQ GND |IRQ |GPIO24 |18 |
69-
|RST 3.3V |RST |GPIO25 |22 |
69+
|MFRC522 Pin Name |Function |RPI GPIO |RPI Pin |
70+
|------------------|--------------------|------------------|---------|
71+
|SDA |Chip Select (CE) |GPIO8 (SPI0 CE0) |24 |
72+
|SCK |Serial Clock |GPIO11 (SPI0 SCLK)|23 |
73+
|MOSI |Master Out, Slave In|GPIO10 (SPI0 MOSI)|19 |
74+
|MISO |Master In, Slave Out|GPIO9 (SPI0 MISO) |21 |
75+
|IRQ |Interrupt Request |GPIO24 |18 |
76+
|GND |Ground | |20 |
77+
|RST |Reset |GPIO25 |22 |
78+
|3.3V |Power | |17 |
7079

7180
Some RC522 boards use reversed labeling for MOSI and MISO pins. The good
7281
thing is, no harm is done to the card reader when incorrectly connected.

0 commit comments

Comments
 (0)