-
Notifications
You must be signed in to change notification settings - Fork 405
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
LR1110: setRfSwitchTable is problematic #1295
Comments
You're right, LR11x0 is a bit different from the other radio modules in terms of the RF switch. We are basically hijacking the RF switching interface (which was originally intended to just configure GPIO high/low behavior) to perform a specific SPI transaction, and that obviously has to be called after begin, so I will fix the examples.
Hmmm, that's trickier - there's also the fact that there can be a mix of LR11x0 DIO pins, as well as the host MCU pins in the switch table (for example, the GNSS LNA enable pin on the WM1110). I will try to figure something out here. |
you're right. note that the LR1110 command expects a 5-bit bitmask for each state with its fixed bit assignments (e.g. bit 0 is always DIO5 even if DIO5 is globally disabled). Right now the loop sets the bit corresponding to the position in |
I just pushed a couple of commits which should resolve this. It will now be able to distinguish between DIO and GPIO pins, and it should handle gaps in the modes/pins table correctly. I have tested your particular configuration in gdb (it's a good test case as it contains both a skipped DIO pin, as well as some skipped modes) and it looks like it configures the RF switch correctly. |
Issue1: in most of the LR11x0 examples setRfSwitchTable is called before
begin()
but it has to be called after. Example: https://github.com/jgromes/RadioLib/blob/master/examples/LR11x0/LR11x0_Transmit_Blocking/LR11x0_Transmit_Blocking.ino#L66Issue2: The table used for setRfSwitchTable for the LR1110 must have all possible state rows and all 5 columns for all 5 possible pins according to https://github.com/jgromes/RadioLib/blob/master/src/modules/LR11x0/LR11x0.cpp#L1456-L1460
I had something like:
and this does not work at all.
(On issue 2 I'm not arguing how it should work except that if it's completely different from other radios then the docs for the method should mention it.)
The text was updated successfully, but these errors were encountered: