How to use MFRC522 on BW16?

Hi,
i can’t find the example for MFRC522 on BW16.
there is only the example on RTL8195.(Ameba Arduino: [RTL8195AM] [RTL8710AF] RFID – Using RFID RC522 module as RFID Reader – Realtek IoT/Wi-Fi MCU Solutions)

so I uploaded the example, and the serial monitor shows “error invalid pin”.
how should I modify the above library to use on BW16?

thanks.

Welcome to the forum James!

Assuming you installed the latest .zip file from Ameba1’s github repo:

All you need to do is change the definitions of RESET and SS pins in your .ino example file. For BW16, RST_PIN = 7 and SS_PIN = 9.

If you need assistance with connecting your RFID reader to your BW16 board, refer to the following:

MFRC522 pins => BW16 pins
SDA => PA15/Pin 9
SCK => PA14/Pin 10
MOSI => PA12/Pin 12
MISO => PA13/Pin 11
IRQ => PA26/Pin 8
GND => GND pin
RST => PA25/Pin 7
VCC => 3.3V pin

Do let us know if you need further assistance!