ArduinoGeneral

Question regarding reading value of bme280 module

userHead Account cancelled 2021-08-13 14:49:25 309 Views0 Replies
Hi, there.
I found an IIC demo using STM32F103 from the Internet and used it to read the value. After that, I followed the demo to modify my own code and found that the idea was the same at times. However, some delayed modifications cannot be read by downloading with my own program. I put my main function code into the demo again and found that the value can be read.
After several attempts, it was found that the bme280 gas sensor must be re-powered before reprogramming. If resetting will cause the CSB to have a low level, the IIC will not be able to recognize it. In another case, if the CSB and SDO pins are not connected, the reset button can be pressed. It can be seen that there are pull-ups and pull-downs inside the BME280. Reference datasheet and parameters:https://www.utmel.com/components/bme280 ... ons?id=162

The questions I want to ask are:
When I first started using SPI, why didn't I get the value and the driver couldn't run. So what should I pay attention to when I use SPI to read the value? Thank you for your advice.

Yours sincerely,
Tessie