Trying to use the SX1262 with the STM32L0 and got stack at TASK_CAD #111
Unanswered
Jackiii1989
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a LoRaWAN gateway and have successfully executed a Join request and sent some data using the SX1276. While there were some initial issues with the code—likely due to incomplete porting to the STM32L0—I was able to resolve them and get everything working.
Now, I am attempting to run the same application on the SX1262. However, the code gets stuck at the TASK_CAD stage. From what I understand, this means the device is performing Channel Activity Detection (CAD), scanning the channel before transmitting to avoid collisions. Unfortunately, it never progresses past this point. The device remains in this state until the RP_FAILSAFE is triggered, causing the modem to restart. Below is the log:
I have tried to disable CAD but have not found any function or API in the codebase (including smtc_modem.c) that allows this. It appears there is no direct way to deactivate CAD from the application layer. Is there a recommended method to disable CAD or am I missing something else?
I am using the SX1262 LoRa Node Module for Raspberry Pi Pico. It should be a general purpose device that other MCU can use. I hope my assumption is correct, right?
(What is also strange is that I never get an interruption on DIO1. With the SX1276, a rising edge indicated that the TX has sent the data).
I configured the SPI with CPOL=0 and CHA=0 like in the datasheet stated. However, when monitoring the SPI bus, it seems that the sampling is not occurring correctly:
This is the initialisation phase, something to do with reading some data in the retention list. The first byte is the read register command, and then probably some retention address. The LORA device tries to send some data, but it seems to send on the second edge, and is registered as zero by the logic analyser and the STM32L0:
This is something strange right?
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions