03-20-2022 10:58 AM - edited 03-20-2022 11:11 AM
Hello! I am currently trying to make my BMG250 working, but it is always in suspended mode from startup. I can read ID, temperature and read/write some configuration registers, but nothing happens when I attempt to change power mode to normal. And all other readings are zeros.
So my init procedure looks like that:
void BMG250_Init(SPI_DEVICE spi)
{
bmg250.device = spi;
HAL_GPIO_WritePin(bmg250.device.cs_port,bmg250.device.cs_pin,GPIO_PIN_SET); // CS pin high
BMG250_IO_ReadID(); // Read from reg 0x00 to enable SPI mode
HAL_Delay(10); // Delay 0x00
BMG250_IO_Start(); // Write 0x15 to 0x7E reg
HAL_Delay(1000); // Waiting for reboot
BMG250_IO_ReadID(); // Read ID
BMG250_IO_ReadStatus(); // Read PMU status
}
And I end up with this
I checked everything:
I designed my code according to https://github.com/BoschSensortec/BMG250-API
But it still does not work.
Please help me!
03-20-2022 03:10 PM
Hello WirelessMan,
Suggest you refer to the flow of the example program to run it.
https://github.com/BoschSensortec/BMG250-API/tree/master/examples
03-20-2022 04:39 PM
Dear BSTRobin,
As I said, I followed examples on this GitHub page. It does not help.
03-22-2022 10:13 AM
Hello WirelessMan,
Could we know what is the specific phenomenon that you can't use it normally? This is a tested code, which is finally put on GitHub.
03-22-2022 10:51 AM