SX126x-Arduino V2 problem in the DeepSleep-nRF52Pio

Please include the following information, in order for us to help you as effectively as possible.

  • What product do you wish to discuss? RAK4631

  • What firmware are you using? VSCode/PlatformIO

  • What firmware version? It isn´t RUI3, because the company decide to develop with FreeRTOS

  • Computer OS? (MacOS, Linux, Windows) Windows

  • What Computer OS version? Windows 11

  • How often does the problem happen? Always

  • How can we replicate the problem? Yes

  • Provide source code if custom firmware is used or link to example if RAKwireless example code is used.

When I try to compile the project DeepSleep-nRF52Pio and I receive a error message the variable “loraEvent” was not declared in the lora_handler.cpp in the @beegee code.

I think that it is missing the declaration:

Blockquote

SemaphoreHandle_t loraEvent;

void setup() {

loraEvent = xSemaphoreCreateBinary();

Blockquote

@beegee , could you take a look in the DeepSleep-nRF52Pio example?

Regards,

Claudio

I did a quick fix and I think that now it is fine, at least no compilation errors:

@beegee , is it fine for you?

Claudio

Blockquote

// Create the LoRaWan event semaphore

**SemaphoreHandle_t loraEvent;**

loraEvent = xSemaphoreCreateBinary();

// Initialize semaphore

xSemaphoreGive(loraEvent);

Blockquote

The code is 3 years old, didn’t touch or use it since then.
I think this semaphore is not used at all. It might be a left over from an old version of the SX126x-Arduino library.

If you search for loraEvent within the project, is it used anywhere?

What is the LoRa SX126x library that you recommend? I am using FreeRTOS.

Cláudio

Never tried on plane FreeRTOS, only with the Arduino BSP’s for nRF52, ESP32 and RP2040, but I am always using the SX126x-Arduino library. It is using FreeRTOS functions like tasks and semaphores with ESP32 and nRF52. Only RP2040 is differenent because the BSP is mBED based.