04-25-2023 11:56 AM
Hi,
I am using bhi260ap IMU for my project from command line as well as low level interface i can able to communicate with imu via I2C, but if i try to do the same with SPI i couldn't able to do it with either way.please help me with this issue.
Steps followed:
1.Directly connected IMU sensor with MCU which is having 1.8V as supply and communication voltage(Not working).
2.Using a level shifter, connected 3.3V supply MCU to IMU. connected MISO,MOSI,SCK,SS and VDD,VDDIO(1.8V given) and ground connected(Not working).
NOTE: Above two steps are working fine with I2C interface with their respective connections.
We have gone through the entire Datasheet and still this issue persisit. Is there any other connection required for SPI?
Solved! Go to Solution.
05-04-2023 10:49 AM
Hi rajesh_s,
1.There is no affect for SPI communicatoin that HOST_BOOT was connected to GND;
2.See it from you schematic, you used BHI260AP shuttle 3.0 board, is it right?
3.You could execut the code bhy2_get_product_id() and capture SPI waveform and check how about the actual SPI communication.
05-04-2023 03:39 PM
Hi BSTRobin,
yes we are using BHI260AP shuttle 3.0 board. Are you saying this function (bhy2_get_product_id()) from coines API?
because in SDK that function is not present. In that case, can i call that function directly from my mcu with all dependency libraries?
Our main objective is to establish communication between BHI260AP shuttle 3.0 board and atsamd51 mcu using spi protocol,without using application board 2.0
05-04-2023 04:39 PM
Hi rajesh_s,
This function bhy2_get_product_id() was from in BHI260AP sensor API(https://github.com/boschsensortec/BHY2-Sensor-API), you could call this function on host MCU side.
BHI260AP software(sensor API and example code) was officially released on github https://github.com/boschsensortec/BHY2-Sensor-API, you could migrate it to your platform.
I upload BHI260AP example code on STM32 that was not run with applicaiton board, you could also refer it.
05-05-2023 02:02 PM
Hi BSTRobin,
Thanks for the reply.
We have already tried this with stm32 board using I2C it is working fine but not SPI. could you share us an example testing code for SPI communication...
we used the same bhy2_get_product_id() function if you can provide the same using SPI it will be easy to debug for us.
05-05-2023 03:44 PM
Hi rajesh_s,
Previous attached example code on STM32 demostrated SPI communication, you could see the macro definition in the file user_define.h
//#define USE_I2C_INTERFACE
#define USE_SPI_INTERFACE