Conversation
|
Hi @matthias-bs, thanks for contributing! Lovely to see an RP2040 example appear here. I personally have a Pico + SX1262 hat in a box somewhere, I'll take it out for a spin early next week to check your example! |
|
Hi @StevenCellist , |
|
@matthias-bs finally managed to setup my VS Code / PlatformIO to work nicely with this repo, but I am having include errors on some of the pico source files (e.g. |
|
Which extensions do you use besides PIO and the Microsoft C++ extension? You can also use the clangd extension. Ignore the warnings... |
|
@Velocet I don't see any Pico/RP2040 environment there.. the problem is not with PIO itself, but I think with the possible platforms against which you can build Pico/RP2040 sketches. |
|
Hm.. i had the same issues as you described thats why i thought it is worth a try. Those settings normally sit in |
|
I used this which is PIO's default for the Pico: Not much to see in the file you mentioned, except that it looks at |
Yes, I'm using Earle Philhower's version with Arduino IDE and VSCode with the Arduino Extension. |
|
Some hacking about later, I can now compile your sketch from PlatformIO. |
|
Had to pull some lines from jgromes/RadioLib#1086 to get SPI1 going - which is not a problem for your Feather which you've probably wired to SPI0. And last few lines of output: |
|
Sadly no. I'm mostly into ESP32 and STM32. |
|
@StevenCellist I can only tell that this example works for me. I checked if there is anything special regarding the board I used (such as an extra RTC clock - which is not present), but I didn't find anything. I've made the experience that the RTC part is tricky, too. First you have to enable it, then you have to ensure that it is initialized with valid data and finally you have to ensure that the wake-up time is set correctly. And of course, you have to take care that it is still running in sleep mode. Many potential sources for errors... Is this specific for PlatformIO? Did you try it with Arduino IDE? |
|
Missed the edit, currently installing Philhower's core for Arduino IDE. Can you share your config for Arduino IDE: board, tools and other things that may be of importance? |
|
@matthias-bs still no luck with the Arduino IDE. Note that I have a Pico W. Can you share all possible details on your board and configuration? |
|
@StevenCellist Certainly! Software Libraries |
|
Compile Log Serial Console Log TTN Uplink (No suitable payload formatter in place... :-) ) |

This is a working example for RP2040. Persistent storage is implemented using https://github.com/vshymanskyy/Preferences and putting a few variables into the .uninitialized_data RAM section. The watchdog scratch register 1 is used to keep track of the boot count and for initial initialization after HW reset.
Resuming normal operation after wake-up is possible, but currently does not work presumably due to incorrect restoring of clock configurations. As a workaround, a soft reset is performed after wake-up.