Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial wakeup works on ArduinoIDE not on PlatfromIO #828

Open
naveen-79 opened this issue Jan 22, 2025 · 7 comments
Open

serial wakeup works on ArduinoIDE not on PlatfromIO #828

naveen-79 opened this issue Jan 22, 2025 · 7 comments

Comments

@naveen-79
Copy link

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.

stm32duino/STM32LowPower#118

@valeros
Copy link
Member

valeros commented Jan 23, 2025

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:

Alt Text

Could you try linking extra libraries as object files? Just add the following option:

[env:myenv]
...
lib_archive = no

@naveen-79
Copy link
Author

still wakeup fails

@naveen-79
Copy link
Author

Image

@valeros
Copy link
Member

valeros commented Jan 23, 2025

Could you also try adding the CUSTOM_PERIPHERAL_PINS macro to your build?

[env:myenv]
...
build_flags = -DCUSTOM_PERIPHERAL_PINS

@naveen-79
Copy link
Author

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

@valeros
Copy link
Member

valeros commented Jan 24, 2025

-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.

@naveen-79
Copy link
Author

I enabled the same in Arduino IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants