RC522 increased retry loop count (#1506)

This commit is contained in:
Guillermo Ruffino 2021-02-02 20:30:20 -03:00 committed by GitHub
parent f402c89539
commit bccaa78a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,7 @@ RC522::StatusCode RC522::pcd_communicate_with_picc_(
// transmitting. Each iteration of the do-while-loop takes 17.86μs. // transmitting. Each iteration of the do-while-loop takes 17.86μs.
// TODO check/modify for other architectures than Arduino Uno 16bit // TODO check/modify for other architectures than Arduino Uno 16bit
uint16_t i; uint16_t i;
for (i = 4; i > 0; i--) { for (i = 2000; i > 0; i--) {
uint8_t n = pcd_read_register( uint8_t n = pcd_read_register(
COM_IRQ_REG); // ComIrqReg[7..0] bits are: Set1 TxIRq RxIRq IdleIRq HiAlertIRq LoAlertIRq ErrIRq TimerIRq COM_IRQ_REG); // ComIrqReg[7..0] bits are: Set1 TxIRq RxIRq IdleIRq HiAlertIRq LoAlertIRq ErrIRq TimerIRq
if (n & wait_i_rq) { // One of the interrupts that signal success has been set. if (n & wait_i_rq) { // One of the interrupts that signal success has been set.