platform-ststm32
platform-ststm32 copied to clipboard
serial wakeup works on ArduinoIDE not on PlatfromIO
I'm using Lora-E5-Mini board with the Lowpower Serial Deep Sleep Example. The code works fine if compiled in Arduino IDE but fails to work while using PlatformIO.
https://github.com/stm32duino/STM32LowPower/issues/118
Hi @naveen-79, unfortunately, I don't have any STM32W-based hardware at hand to reproduce the issue. I tried the Serial Deep Sleep example with Nucleo-L053R8 and it works quite well:
Could you try linking extra libraries as object files? Just add the following option:
[env:myenv]
...
lib_archive = no
still wakeup fails
Could you also try adding the CUSTOM_PERIPHERAL_PINS macro to your build?
[env:myenv]
...
build_flags = -DCUSTOM_PERIPHERAL_PINS
Serial does not print anything.
HardwareSerial SleepSerial(PC0, PC1);
platformio.ini
[env:lora_e5_mini]
platform = ststm32
board = lora_e5_mini
framework = arduino
build_flags =
-D PIO_FRAMEWORK_ARDUINO_SERIAL_WITHOUT_GENERIC
-D CUSTOM_PERIPHERAL_PINS
lib_deps =
https://github.com/stm32duino/STM32LowPower @ ~1.3.0
https://github.com/stm32duino/STM32RTC @ ~1.6.0
lib_archive = no
anything wrong with the ini file
-D PIO_FRAMEWORK_ARDUINO_SERIAL_WITHOUT_GENERIC
Are you sure you need this option? It's an equivalent of the Enabled (no generic 'Serial') option which is not enabled by default in the Arduino IDE for this board.
I enabled the same in Arduino IDE
Could you make a screenshot of the board settings you're using in Arduino IDE?
any updates
Unfortunately, there are no obvious reasons why it doesn't work with the STM32WL targets. I hope I'll be able to get back to this problem in a few days, but it's quite hard to debug the issue in a reasonable manner without real hardware at hand.