02-22-2024 10:01 AM
Hi guys,
I created a custom board with the BHI360 and BMM350. The schematic is attached.
I'm using 4-wire SPI.
RESETN is high.
With using the BHY2-Sensor-API-master i get no output on the HSDO line when reading the product_id.
#if defined(USE_I2C_INTERFACE)
PDEBUG("Use I2C interface\r\n");
rslt = bhy2_init(BHY2_I2C_INTERFACE, bhy2_i2c_read, bhy2_i2c_write, bst_delay_us, BHY2_RD_WR_LEN, NULL, &bhy2dev);
#elif defined(USE_SPI_INTERFACE)
PDEBUG("Use SPI interface\r\n");
rslt = bhy2_init(BHY2_SPI_INTERFACE, bhy2_spi_read, bhy2_spi_write, bst_delay_us, BHY2_RD_WR_LEN, NULL, &bhy2dev);
print_api_error(rslt, &bhy2dev);
HAL_Delay(5000);
rslt = bhy2_soft_reset(&bhy2dev);
print_api_error(rslt, &bhy2dev);
HAL_Delay(5000);
rslt = bhy2_get_product_id(&product_id, &bhy2dev);
print_api_error(rslt, &bhy2dev);
/* Check for a valid product ID */
if (product_id != BHY2_PRODUCT_ID)
{
PDEBUG("Product ID read %X. Expected %X\r\n", product_id, BHY2_PRODUCT_ID);
}
else
{
PDEBUG("BHI260/BHA260 found. Product ID read %X\r\n", product_id);
}
#endif
I also tried to only write a software reset in register 0x14, and then read data from the Host status register 0x17. But i get no output.
void IMU_init(void){
// BHI360_read_data(0x16);
BHI360_write_data(tx, 0x14, 0x01);
HAL_Delay(100);
BHI360_write_data(tx, 0x16, 0x00);
BHI360_read_data(0x17);
}
Do i make something wrong in the software, or is there a problem because of VDD = 3.3V and VDDIO = 1.8V?
Thanks for your help!
02-26-2024 04:37 AM
Hi schlecns,
After review your schematic, BHI360's VDDIO can only be powered by 1.8V and cannot be powered by 3.3V, ensuring. We suggest using 1.8V power supply for both the VDD and VDDIO domains of BHI360 and BMM350.
We suggest that you use a logic analyzer to capture SPI communication waveforms and check the actual communication waveform situation.