Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on SAMD21 based boards (MKR1000, Feather M0, Zero) #347

Closed
timonsku opened this issue Nov 22, 2017 · 11 comments
Closed

Not working on SAMD21 based boards (MKR1000, Feather M0, Zero) #347

timonsku opened this issue Nov 22, 2017 · 11 comments
Labels
bug 🐛 a not intended feature enhancement 🚀 a wish or proposal for future features help_wanted 💉 here you can help others or/and make pull requests

Comments

@timonsku
Copy link
Contributor

timonsku commented Nov 22, 2017

  • OS version: Ubuntu 17.04
  • Arduino IDE version: 1.8.3
  • MFRC522 Library version: master
  • Arduino device: Adafruit Feather M0
  • MFRC522 device: RFID-RC522

I'm trying to use the library with the Feather M0 which uses the SAMD21 (ARM Cortex M0+) also present on all newer Arduinos like the MKR1000 and Zero.
Unfortunately the library fails to communicate with the RC522 (hangs for ages in init and returns firmware version 0x00 after a while). I tested the same board with an Arduino Nano which worked fine. Any ideas why it doesn't work on the Feather?
Anything SPI wise that is not using standard SPI.h function calls that causes the incompatibility?

@Rotzbua
Copy link
Collaborator

Rotzbua commented Nov 22, 2017

Can you try 1.6.3 https://github.com/miguelbalboa/rfid/releases ?

@timonsku
Copy link
Contributor Author

timonsku commented Nov 22, 2017

I tried 1.3.6 and 1.3.5, same issue.
Although on 1.3.6 I got a Firmware Version: 0xFF = (unknown) instead of 0x00

@timonsku
Copy link
Contributor Author

Just to complete the documentation this is my wiring:
https://imgur.com/a/AKhrP

I checked it 5 times now, seems all in order.

I'm trying out the DumpInfo example.

@Rotzbua
Copy link
Collaborator

Rotzbua commented Nov 22, 2017


General note for migrating to feather m0: https://learn.adafruit.com/adafruit-feather-m0-basic-proto/adapting-sketches-to-m0

@Rotzbua Rotzbua added bug 🐛 a not intended feature enhancement 🚀 a wish or proposal for future features labels Nov 22, 2017
@timonsku
Copy link
Contributor Author

Doing a hard reset as suggested in that bug report indeed did the trick for me. Maybe that is something that should be added to PCD_Init() by default? Or is there another reason why there is deliberately no hard reset? If so maybe an optional "do hard reset" argument for PCD_Init() might be the way to go?

@Rotzbua Rotzbua added the help_wanted 💉 here you can help others or/and make pull requests label Nov 25, 2017
Rotzbua pushed a commit that referenced this issue Jan 14, 2018
On the Wemos D1 mini ESP8266 board the RST pin was LOW all the time and the MFRC522::PCD_Init() didn't reset the MFRC522 because of a non working digitalWrite, resulting in a endless loop.
@Rotzbua
Copy link
Collaborator

Rotzbua commented Jan 14, 2018

Should be fixed with feda7b5 .

@Rotzbua Rotzbua closed this as completed Jan 14, 2018
@blooem
Copy link

blooem commented Feb 5, 2018

I am having the same problem.

Using latest version of code
Arduno 1.8.5
Mac OSX

Just using standard ReadWrite Example works fine on a 32u4 board, however on the M0 it does not display much.
Here is wiring (Although it works on 32u4 so I know its not that): https://photos.app.goo.gl/WJMeFrJUu7ADLxKQ2
Here is a snippet from arduino serial output
screen shot 2018-02-04 at 6 07 36 pm

Any help would be appreciated!
-Brandon

@Rotzbua
Copy link
Collaborator

Rotzbua commented Feb 5, 2018

Using latest version of code

@blooem Version of the code: git master or 1.3.6?

@blooem
Copy link

blooem commented Feb 5, 2018

@Rotzbua
screen shot 2018-02-04 at 6 43 48 pm

In my Changelog I see there is a version 1.4.1 is this correct? If so, where can I download?

@blooem
Copy link

blooem commented Feb 8, 2018

Actually has anyone tested this on: https://www.adafruit.com/product/3056 (STM32F205RG 120MHz ARM Cortex M3 MCU) cant find anything about it in the repo

@timonsku
Copy link
Contributor Author

timonsku commented Feb 8, 2018

You should try the latest version from git not 1.3.6. The thing described here is already fixed.

Rotzbua pushed a commit to Rotzbua/rfid that referenced this issue Apr 13, 2018
…nit() on ESP8266 boards (miguelbalboa#354)

On the Wemos D1 mini ESP8266 board the RST pin was LOW all the time and the MFRC522::PCD_Init() didn't reset the MFRC522 because of a non working digitalWrite, resulting in a endless loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 a not intended feature enhancement 🚀 a wish or proposal for future features help_wanted 💉 here you can help others or/and make pull requests
Projects
None yet
Development

No branches or pull requests

3 participants