I’m currently working on a project on a Nucleo Board (the one with the STM32L054R8), using the Arduino framework. My application requires low power operation most of the time, To do this, I’m attempting to use the STM32LowPower by Wi6Labs (it is found in the library search in PlatformIO). however, when attempting to compile I get the following message:
‘LowPower_init’ was not declared in this scope; did you mean ‘LowPower’?
After checking the source files for the libraries I found that there’s an #ifdef inside the LowPower.c file that checks for some defines, the line question is the following:
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000) && defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY)
which fails (gets a false result) and comments out all the code required for the library to work without problems. From further searching on the source files, I noticed that the things that should be defined (STM32_CORE_VERSION and HAL_PWR_MODULE_ENABLED), however I don’t know if the core version is greater than the value being evaluated. I understand that the library was made for Arduino IDE in mind, so it might be that core versions on PlatformIO might be differently numbered. If anyone could provide me with some pointers on what to look for, I would deeply appreciate it.
PS: Sorry for the formatting, now sure how to work with the controls on the forum’s text editor.