03-30-2023 09:41 PM - edited 03-31-2023 12:13 AM
I have a custom board leveraging the official BMI270 driver and I'm having inconsistent results when initializing the chip. I'm using the official Github based driver. On startup a dummy read of CHIP_ID is performed and the BMI270 does not reply. This should put it in SPI mode per the datasheet. At least 450us later a real read of CHIP_ID is performed with mixed results. When using a SPI clock of 6MHz (CPOL=CPHA=0) it responds, but the bits are often shifted or wrong altogether about 50% of the time. With a 1.5 MHz SPI clock (CPOL=CPHA=0) this initialization works every time. From the datasheet it states that the device powers up in APS mode. Does this require a slower clock until it's turned off? Should it work with up to 10 MHz every time.
03-31-2023 05:36 AM
Hi Bront,
Are you using our BMI270 API?
https://github.com/BoschSensortec/BMI270-Sensor-API/
If you are doing in register level programming, there are many things you have to check manually.
You just need to change communication part in common.c/h.
Therefore, I recommend to use our github API.
If not, for initial part, you have to check 4.4 POR and device initialization in our datasheet.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf
Also, you need to check last part of 4.5 and 6.4 our SPI spec.
For example, you need to wait over 450us if you want to do write access in suspend mode, low power mode.
Thank you.
03-31-2023 01:07 PM
Yes, I'm using the latest API that you reference. The process I described is what happens early in your driver.
03-31-2023 03:32 PM
I noticed the chip identifiecation is the following. Can you please confirm this is a legitimate chip?
5N-3CN