Skip to content

Conversation

jerryneedell
Copy link
Contributor

addresses #31 and #51

implement changes per the errata in https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HSPv/sqi9xX0gs6hgzl2LoPwCK0TS9GDPlMwsXmcNzJCMHjw

added a new kwarg "agc" which can be set to enable the automatic Gain Control - Default is False to disable so there is no change to existing behavior.
The only change to existing behavior is to set bit 7 of Register 0x31 per the errata. For all BW except 500K it is now set to 0.

To address some of the items in #51 several new attributes were added:
auto_agc -- set via agc kwarg or can be set manually after init
low_datarate_optimize - defaults to 0 can be set if desired
lna_boost_hf -- defaults to 0 (off) nay be set to 3 to enable
auto_ifon -- controls bit 7 of register 0x31 (used internally when setting BW)
detection_optimize - (use internally when setting SF)

I have verified that these changes "do no harm" that is my existing programs still work....
I have not thoroughly tested the impact of fiddling with the agc,low_datarate_optimize or lan_boost_hf.
They do set the registers as desired. I do not have a very good way to test the impact.

I also verified that this can still be frozen in to the feather_m0_rfm9x build

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerryneedell Thanks for pulling in these changes - two comments

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerryneedell thanks for clarifying, this looks good to merge!

@jerryneedell
Copy link
Contributor Author

@brentru Do you want me to go ahead and merge/release or would you prefer to see if there are any other comments? I'm in no rush. Once it is merged, I can put in a PR to update the feather_m0_rfm9x build for CP.

@brentru
Copy link
Member

brentru commented Dec 23, 2020

@jerryneedell go ahead and merge 👍

@maholli
Copy link

maholli commented Dec 23, 2020

@jerryneedell I'm working remote so I can't test anything, but your updates reflect what I found working prior.

For anyone that had CRC / corrupt packet issues (I remember seeing at least 2 issues or questions on the forums) I HIGHLY recommend trying again with low_datarate_optimize enabled on both ends.

Thanks for implementing Jerry!!

@jerryneedell jerryneedell merged commit 4696e07 into adafruit:master Dec 24, 2020
@jerryneedell jerryneedell deleted the jerryn_updates branch December 24, 2020 10:20
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 25, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM9x to 2.1.0 from 2.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#57 from jerryneedell/jerryn_updates

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.5.2 from 1.5.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#46 from slootsky/feature/add_PortalBase_to_Dependencies_in_README
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

Successfully merging this pull request may close these issues.

3 participants