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

Feather RP2040 RFM69 Packet Radio version 35 not supported #52

Closed
michaeldye opened this issue Apr 21, 2024 · 7 comments
Closed

Feather RP2040 RFM69 Packet Radio version 35 not supported #52

michaeldye opened this issue Apr 21, 2024 · 7 comments

Comments

@michaeldye
Copy link
Contributor

A recently-purchased feather has an rfm69 device that reports version 0x23 which fails a version check in the RFM69 constructor:

...
  File "/lib/adafruit_rfm69.py", line 316, in __init__
RuntimeError: Invalid RFM69 version, check wiring!

Version number extraction from REPL:

import time
import board
import digitalio
import adafruit_bus_device.spi_device as spidev
from micropython import const

reset = digitalio.DigitalInOut(board.RFM_RST)
reset.switch_to_output(value=False)
reset.value = True
time.sleep(0.0001)
reset.value = False
time.sleep(0.005)

buff = bytearray(4)
dev = spidev.SPIDevice(board.SPI(), digitalio.DigitalInOut(board.RFM_CS), baudrate=2000000, polarity=0, phase=0)
with dev as d:
  buff[0] = const(0x10) & 0x7f
  d.write(buff, end=1)
  d.readinto(buff, end=4)


print(f"{buff[0]:#0x}")
@jerryneedell
Copy link
Contributor

jerryneedell commented Apr 21, 2024

Wow! Is this an Adafruit rfm69 board? Can you provide a link to it and to the datasheet for it?
@ladyada Are you aware of any change in the device ID?

The data sheet clearly indicates that it should be 0x24 --- was it ever 0x23?

@jerryneedell
Copy link
Contributor

Apparently the SX1231 chip does indeed have a Revision ID of 0x23
https://cdn-shop.adafruit.com/product-files/3076/sx1231.pdf
while the RFM69HCW data sheet says it it 0x24 ????
https://cdn-shop.adafruit.com/product-files/3076/RFM69HCW-V1.1.pdf

Both data sheets are referenced in the guide for the RP2040 RFM69 and the Feather M0 RFM69

What is correct?

@michaeldye
Copy link
Contributor Author

Yeah, it is one of two PID: 5712 boards I bought from adafruit.com on 4/16/24. The other of the two boards reports 0x24. I made the change in PR #53 to get them to both work with the lib.

@jerryneedell
Copy link
Contributor

jerryneedell commented Apr 21, 2024

Yeah, it is one of two PID: 5712 boards I bought from adafruit.com on 4/16/24. The other of the two boards reports 0x24. I made the change in PR #53 to get them to both work with the lib.

Yes, thanks for the PR... It would be good to get some confirmation of a HW change.
Can you post pictures of the 2 boards? Are the RF modules different?
This will set back debugging discipline ;-) Failure of the ID check has always been attributable to a wiring issue ...

@michaeldye
Copy link
Contributor Author

Left - board whose rfm69 reports version 0x23
Right - board whose rfm69 reports version 0x24

feather-rp2040-rfm69-versions-sm

@michaeldye
Copy link
Contributor Author

Apparently the SX1231 chip does indeed have a Revision ID of 0x23
https://cdn-shop.adafruit.com/product-files/3076/sx1231.pdf

p. 84 of that doc says there are limited supply chips with values 0x21 and 0x22 for that register as well.

@ladyada
Copy link
Member

ladyada commented Apr 22, 2024

those are almost the same datecode, but the 0x24 is a few weeks later...so maybe they did revise something. we do test each board by send/recv data so it should work fine, we just need to tweak the value we check against in this library @jerryneedell could you do a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants