SPI - RFID
0. Pin Map
PA4
CS
A2
PA5
MOSI
PWM/MOSI/D11
PA6
MISO
MISO/D12
PA7
SCLK
SCK/D13
2. Code
First, add the code from the Template Project.
In main.c
, add the following code
After saving, upload the code.
3. Result
After connecting an RFID-RC522 SPI module, we can see that we can read the register from the sensor. The SPI signal looks like this:
https://community.st.com/s/question/0D53W00001nAhvYSAS/how-to-use-spi-nss-on-stm32g0
Last updated
Was this helpful?