2025-04-24 5:47 AM
Hello
I would like to get the lis2mdl magnetometer data using the lsm6dsv second i2c line using the sensor hub.
so far I get the accelerometer and gyroscope data via SPI and I want to add the magnetometer data.
The code I have to configure the sensor hub and retrieve the data doesn't work. The i2c line doesn't even move (I checked with an oscilloscope)
I checked with the example here https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dsv_STdC/examples/lsm6dsv_sensor_hub.c#L504
but I have trouble understanding the code
I have a nucleo board l476RG not the demo board given in the example but since my spi communication works it shouldn't be a problem. I also have several lsm6dsv connected to my MCU but right now I try to make it works for at least one.
I use the lsm6dsv_reg and lis2mdl_reg lib
can anyone tell me what is wrong and why I can't make this i2c line work?? I've been trying for 3 days already
I attached my project