RAK4260 wakeup issues

Soon after the wakeup of the RAK4260, the USART interface does not works properly, throwing garbage over the serial. The only way to overcome this issue is to apply a long delay of 2000 ms after the wakeup, then it works normally. But this fix is not ideal, since my device is battery powered, and every wasted millisecond counts.

Before sleep, I set all peripherals down, including USART, I2C, ADC, HAL_RADIO, RF SWITCH POWER (SKY133373 on PA28) and the TCX0 (on PB03). The sleep mode works fine, with just some few uA of consumption.

I wonder if there is some other peripheral missing initialization, or any other clock that must be always on, since I expected the wakeup to be much more fast.

Welcome back to the forum @GianZanuz

What BSP are you using to write your application.

We are using the RAK4260 module in our custom board. It contains some I2C and SPI peripherals, USART interface, and a NFC chip. You can see the pins used on attached image.

The firmware was initialized based on RAK4260-LoRaNode-demo.

I see, that is using the Microchip SDK.

This example code is 4 years old and I am afraid that it is abandoned. I guess you have to look into the Microchip SDK to find an answer.

@beegee I think I found the problem here.
All the peripherals are using the main GCLK0 clock, generated by the DFLL.
The DFLL was feeded by the 32kHz clock generated from the XOSC32K oscillator.
But the XOSC32K was disabled during standby, so every wakeup it was necessary to wait for the STARTUP_TIME (65536 cycles, or 2 seconds).

Setting the CONF_CLOCK_XOSC32K_RUN_IN_STANDBY = true in “conf_clocks.h” solved the problem.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.