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!
... View more