miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.73k stars 1.42k forks source link

Teensy 4.1 fails to read version with 1.4.10 #591

Open bigoren opened 1 year ago

bigoren commented 1 year ago

Step 1: Describe your environment

Step 2: Describe the problem

When working with version 1.4.10 reading the VersionReg returns 0x0 instead of the expected 0x92, Reverting back to 1.4.9 fixes the issue

Steps to reproduce:

  1. Initialize MFRC522 device
  2. Read VersionReg
  3. Print result

Observed Results:

0x0 printed

Expected Results:

0x92 print

Relevant Code:

void setup() {
  SPI.begin();     // Init SPI bus
  rfid.PCD_Init(); // Init MFRC522
  /* read and printout the MFRC522 version (valid values 0x91 & 0x92)*/
  Serial.print(F("RFID Reader version: 0x"));
  byte readReg = rfid.PCD_ReadRegister(rfid.VersionReg);
  Serial.println(readReg, HEX);
}
Rotzbua commented 1 year ago

Function change was #569 Maybe teensy handles yield() different than Arduino & ESP.

Rotzbua commented 6 months ago

@bigoren Have you tried to fix it or have a solution?