Simple Interfacing of the BME280 sensor from Bosch with STM32. I have implemented it with STM Nucleo- F070RB. You can copy the files in core/Inc/BME_280.h and core/Src/BME_280.c and change #include "stm32f0xx_hal.h" in BME_280.h according to your STM board
No implementation of the forced mode.