Sure, I am using the code exactly as it is in euler and quaternion and other examples. The BHI360 has no flash, so its only the ram upload. Also I'm using the BHI360_BMM350C.fw.h file. All of this is in the Coines 2.8.8 release under examples/bhy2/examples. rslt = bhy2_init(BHY2_SPI_INTERFACE, BHI360_msg_read, BHI360_msg_write, BHI360_delay_us, BHI360_RD_WR_LEN, NULL, &bhy2); print_api_error(rslt, &bhy2); rslt = bhy2_soft_reset(&bhy2); print_api_error(rslt, &bhy2); // Check for a valid product ID. rslt = bhy2_get_product_id(&product_id, &bhy2); print_api_error(rslt, &bhy2); if (product_id != BHY2_PRODUCT_ID) { printf("Product ID read %X. Expected %X\r\n", product_id, BHY2_PRODUCT_ID); } else { printf("BHI360 found. Product ID read %X\r\n", product_id); } // Check the interrupt pin and FIFO configurations. Disable status and debug. //YOU MAY NOT NEED ACTIVE LOW DEPENDING ON THE HOST MCU hintr_ctrl = (BHY2_ICTL_DISABLE_STATUS_FIFO | BHY2_ICTL_DISABLE_DEBUG | BHY2_ICTL_ACTIVE_LOW); rslt = bhy2_set_host_interrupt_ctrl(hintr_ctrl, &bhy2); print_api_error(rslt, &bhy2); // Configure the host interface. hif_ctrl = 0; rslt = bhy2_set_host_intf_ctrl(hif_ctrl, &bhy2); print_api_error(rslt, &bhy2); // Check if the sensor is ready to load firmware. rslt = bhy2_get_boot_status(&boot_status, &bhy2); print_api_error(rslt, &bhy2); if (boot_status & BHY2_BST_HOST_INTERFACE_READY) { uint8_t sensor_error; int8_t temp_rslt; printf("Loading firmware.\r\n"); // THE upload_firmware routine, as is most of this code in euler.c and quaternion.c upload_firmware(boot_status, &bhy2); rslt = bhy2_get_kernel_version(&version, &bhy2); print_api_error(rslt, &bhy2); if ((rslt == BHY2_OK) && (version != 0)) { printf("Boot successful. Kernel version %u.\r\n", version);
... View more