Gpio6 and Gpio7 on ESP32c3

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
saimshuja
Posts: 1
Joined: Wed Aug 17, 2022 11:25 am

Gpio6 and Gpio7 on ESP32c3

Post by saimshuja » Wed Aug 17, 2022 11:44 am

I am trying to connect MFRC522 RFID reader to ESp32C3.

i am using esp32-c3-mini-1 module.

i am using https://github.com/Tasm-Devil/micropyth ... mfrc522.py this library.

i have a board manufactured which connects:

Function====ESP32C3====RC522
SDA========GPIO10========24
SCK========GPIO6=========29
MOSI========GPIO7========30
MISO========GPIO2========31

Code: Select all

 
 	sck = Pin(6, Pin.OUT)
        mosi = Pin(7, Pin.OUT)
        miso = Pin(2, Pin.IN)
        cs = Pin(10, Pin.OUT)
        
        spi = SoftSPI(baudrate=100000, polarity=0, phase=0, sck=sck, mosi=mosi, miso=miso)
        rdr = MFRC522(spi, cs)
        
        while true:
        	(stat, tag_type) = rdr.request(rdr.REQIDL)
        	print(stat, tag_type)
        	sleep(1)
        
but unfortunatly i recive :

Code: Select all

2 0 
when i bring rfid card near nothing changes.

but i have tested same code on Esp32 and it works.

i think its issue with gpio6 and gpio7 being used for Jtac connection as default.
As shown in esp32-c3_technical_reference_manual_en.pdf page 161 Table 5­2. IO MUX Pin Functions.

what do you think ?

do you have any experiance of using gpio 6 and 7 ?
please guide, is there a possible solution ?

Post Reply