Bme280 ZEPHYR 2.20 platformio - FORCE mode not exist

Sir, can you help me ?

I am using the ZEPHYR 2.200 on PLATFORMIO and looks that the BME280 driver does not have the FORCED MODE option on drivers—>sensors—>bme280.

But I see that this OPTION has in the ZEPHYR 2.3.

if BME280

choice
prompt “BME280 sampling mode”
default BME280_MODE_NORMAL
help
Select sampling mode. In normal mode continuous measurements are
performed, whereas in forced mode only single measurement is performed.
config BME280_MODE_NORMAL
bool “normal”
config BME280_MODE_FORCED
bool “forced”
endchoice

How can i put the DRIVER of BME280 (ZEPHYR 2.3) in the ZEPHYR(PLATFORMIO 2.2) to compile without any error ?

Here the github

Thank you so much!

Miguel Wisintainer

Why? 5.0.0 is already out and it has Zephyr 2.4. See releases page.

If you do want Zephyr v2.3.0, use @4.3.0 in the nordicnrf52 platform version – but if you’re updating, why not all the way.

Do you mean that if i put
platform = nordicnrf52@5.0.0

will i have access to FORCE option in ZEPHYR ? Still not clearn to me

The used packages (that is, framework, compiler, upload tools, etc.) are dependent on the platform version. The platform you’re working with in your project link is nordicnrf52. There are different versions of this platform available, as I have linked in the release page below. Every release version makes use of specific package versions – so by using nordicnrf52@5.0.0, you will automatically have Zephyr 2.4. I project that if the FORCED option was available in 2.3, it is still available in 2.4. You can also see in the release page that the release notes for 4.3.0 say that it’s now using Zephyr 2.3 – that’s why platform = nordicnrf52@4.3.0 is also an option which will upgrade your project to Zephyr 2.3.

Dear maximilian

Thanks to answer me today! Thanks to your patience!

I will do the tests and i will report you!

Thank you again!

Btw, i have many blogs published using Platformio!

Dear @maxgerhardt

it´s working, got lower comsuption now on BME280.

Do you have a zephyr example with other low power parameters for consumption ?

Something i have to turn off to reduce the consumption!

I’m no Zephyr expert by any means, so all I can do is google: zephyr/samples/boards/nrf/system_off at zephyr-v2.3.0 · zephyrproject-rtos/zephyr · GitHub, nRF5x System Off demo — Zephyr Project Documentation.

Low-power is also hardware dependent. E.g., if you power the board via 5V USB and use a linear power regulator to get it to the needed 3.3V (or 1.8V in some systems), that regulator will induce a power loss by generating heat. Any power conversion (DC-DC or AC-DC), every component, has a leakage current and a working current. The interesting currents here are what flows into the microcontroller itself (and that is depedent on deep-sleep states and activated peripherals and clocks) and the current that flows into the whole board “solution”.

You should first set a baseline of what’s the lowest possible current draw (and voltage) by using the examples above, which only cycle through the deepsleep states and do nothing else, and cross-check that against the microcontroller’s datasheet claimed deep-sleep current value (while respecting the additional current draw imposed by using peripherals like, BLE, UART, etc.).

Only then you know what is maximally achievable and know how far your current project is away from that.

yes,

I am getting now 60uA, but still too much!

I will test that example!!!

Thank you again! Make my day!