2024-05-22 06:51 AM
Hey ,i have been trying to link ISM330DHCX sensor to external sensors.
Problem :
working with STEVAL-STWINKT1B board and the schematics for my sensor ISM330DHCX clearly cannot be configured to be connected to external sensors , even though it is allowed to link up to four sensors as slaves .
in my case ( with the KT1B board) ISM330DHCX (the I²C master) sensor communicate with the processor via SPI ( 4-wire) and should be commmunicating with its slaves (in here im working with one and only slave ; IIS2MDC : magnetometer) Via I2C ( sensor hub mode 2 is enabled ) ,
in my case : i get no data even though i made sure to configure I2C and Configure Sensor Hub to read IIS2MDC , followed every step of AN5398 (7 Mode 2 - sensor hub mode.), Prepared sensor hub to read data from external Slave0 continuously, Enabled accelerometer to trigger Sensor Hub operation and Enabled I2C Master ;
RQ : All external sensors have to be connected in parallel to the SDx/SCx pins of the ISM330DHCX ,however based on the schematics(UM2777) the SDx/SCx sensor's pins are both connected to 3V3_Sensors , would that make it impossible to configure my sensor ISM330DHCX for the sensor hub mode in my case with the STEVAL_STWINKT1B.
i also followed the example on the git and adapt it to my hardware :
STMems_Standard_C_drivers/ism330dhcx_STdC/examples/ism330dhcx_sensor_hub_iis2mdc.c
@Peter BENSCH@niccolò @Eleon BORLINI
ism330dhcx_sh_read_data_raw_get(&ag_ctx,(ism330dhcx_emb_sh_read_t *)data_raw.u8bit, 6);