cancel
Showing results for 
Search instead for 
Did you mean: 

I'm Facing Some Serious issue on RC522 To STM32

Major_Man
Associate

// Waiting to receive data to complete

i = 2000; // i according to the clock frequency adjustment, the operator M1 card maximum waiting time 25ms

do

{

// CommIrqReg[7..0]

// Set1 TxIRq RxIRq IdleIRq HiAlerIRq LoAlertIRq ErrIRq TimerIRq

n = Read_MFRC522(CommIrqReg);

i--;

}

while ((i!=0) && !(n&0x01) && !(n&waitIRq));

 

ClearBitMask(BitFramingReg, 0x80); // StartSend=0

 

if (i != 0)

{

if(!(Read_MFRC522(ErrorReg) & 0x1B)) // BufferOvfl Collier CRCErr ProtecolErr

{

status = MI_OK;

if (n & irqEn & 0x01)

{

status = MI_NOTAGERR; // ??

}

 

if (command == PCD_TRANSCEIVE)

{

n = Read_MFRC522(FIFOLevelReg);

lastBits = Read_MFRC522(ControlReg) & 0x07;

if (lastBits)

{

*backLen = (n-1)*8 + lastBits;

}

else

{

*backLen = n*8;

}

 

if (n == 0)

{

n = 1;

}

if (n > MAX_LEN)

{

n = MAX_LEN;

}

 

// Reading the received data in FIFO

for (i=0; i<n; i++)

{

backData[i] = Read_MFRC522(FIFODataReg);

}

}

}

else

{

//printf("~~~ buffer overflow, collerr, crcerr, or protecolerr\r\n");

status = MI_ERR;

}

}

else {

//printf("~~~ request timed out\r\n");

}

 

return status;

}

 

i'm Not Detected The RFID Card.

i'm Debug The Code then issue of Code in Highlighted Font.

And My Clock Configuration Is has Below.

My Development Board Is STM32H7A3ZIT6Q.

How Can I Solve This Please Give The Solution??.

Thanks In Advance..

Major_Man_0-1710939198466.pngMajor_Man_1-1710939242509.png

 

0 REPLIES 0