07-25-2022 12:33 PM
Dear Community.
My team and I are pretty new to the BHI260AP and are exploring ways to integrate it with the BMM150 into our PCB designs.
We wanted to interface the BHI with a host MCU, placed in another PCB, using I2C. So we were considering only 4 connections from MCU to the BHI: VDD, GND, SDA, and SCK; We realized that the pin HIRQ, from the documentation, is also required to be connected to the MCU.
Is there a setup in which we can skip this connection? I can tell that in our design it should be the MCU to interrogate the BHI for data, even if there is no interrupt. Can someone give us some hints?
Solved! Go to Solution.
07-25-2022 04:02 PM
Hi dariosortino,
You could refer schematic in shuttle board or data sheet to connect BHI260AP to host.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/shuttle_board_flyer/application_board...
And refer sensor API(https://github.com/BoschSensortec/BHY2-Sensor-API) and attached example code.
07-25-2022 04:46 PM
Hello Robin,
thanks for checking in.
I am already using the guidelines that you suggested (both from the shuttle board and from the datasheet).
Let me reformulate the question: what happens if I don't connect the HIRQ pin? Will I still be able to exchange messages via I2C?
As I can see here, around lines 181-189, it is interrogated the get_interrupt_status() in order to check if there is anything new in the FIFO before reading it and parsing it, and it's not making use of an interrupt request in the host MCU. So I am thinking about just not connecting the HIRQ pin.
Am I wrong? Any elaboration on this?
Thanks,
Dario
07-26-2022 04:51 AM
Hi dariosortino,
As you can see it in example code, you can initialize sensor successfully if you don't connect HIRQ pin. But you don't know when FIFO data is ready. So you can follow the connection in reference hardware schematic.
while (rslt == BHY2_OK)
{
if (get_interrupt_status())
{
/* Data from the FIFO is read and the relevant callbacks if registered are called */
rslt = bhy2_get_and_process_fifo(work_buffer, WORK_BUFFER_SIZE, &bhy2);
print_api_error(rslt, &bhy2);
}
}
08-23-2022 10:48 AM
Instead to check the physical HIRQ pin, there is a register that reflect the status of the FIFO, as explained in the datasheet.