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

Inconsistency in SX1280 SPI Read Functions: Required Buffer Adjustment #100

Open
sluissantos opened this issue Jan 10, 2025 · 0 comments
Open

Comments

@sluissantos
Copy link

Here’s an improved version of your text:

I am working on a project using LoRa 2.4GHz, and here are the details of my setup:

Development Environment: SES 8.18, nRF5 SDK Version 17.1, nRF52832
Transceiver: E28-2G4M12S (SX1280)
Gateway: MikroTik wAP LR2 kit
I am adapting the example from application_example/2_porting_nrf_52840 to work with the nRF52832.

After spending a significant amount of time reviewing the stack commands, I discovered an inconsistency.

The default sx128x_hal appear to have an issue with the SPI read data functions in this setup. To read data correctly, the rx buffer must include the tx command length over SPI.

For instance, using the default stack's ReadRegister command:

Screenshot from 2025-01-10 14-16-48

The rx buffer needs to be shifted by 4 bytes, meaning the correct return is offset by 4 positions. Therefore, it is necessary to increase the rx buffer length by 4 bytes (3 for the command and 1 for the NOP).

The returned status bytes are almost always: 0x45, 0x47, 0x47, ...

This adjustment is required for all instructions that involve retrieving data from the radio.

Additionally, when using the wAP LR2 Kit, I had to update the firmware to the latest version.

With these changes, my application is now working perfectly.

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

1 participant