2024-12-19 03:17 AM
Hello everyone.
I and my team are a bunch of BSc students in electrical engineering currently working on a gimbal project at our uni. My task is to prepare our IMU, the LSM6DSV16X by ST, for the readout of the game rotation vector so that we can get quaternions from it. The FIFO-Tag which should read 0x13 in the first five bits still reads 0x00, so there's apparently still no FIFO-Functionality enabled.
I've used the ST-library found at https://github.com/STMicroelectronics/lsm6dsv16x-pid to implement the necessary functions and the platform_read and -_write funtions seem to work - I can send and receive signals and write to wr-registers and have the written bytes "stay there" as I've confirmed using oscilloscopes (measuring the MOSI and MISO signals alongside the clk and sc signals).
The clk polarity is set to low and the clk phase to 1 Edge in the SPI configuration, just in case the problem lies there.
Attached is the IMU's datasheet for easy reference as well as the init_imu() and validate_quaternion() functions I intend to use. I'm almost certain there must be a registered which needs to be configured still, but I'm at a loss.
Lastly, I should mention that this is my first time coding in C. I've taken two Java courses over the first two semesters of my BSc which was my first go at coding in general, but heavily underestimated how badly it would translate to C and programming firmware for uC's in general. I suppose what I'm trying to say is: Please go easy on me... :,)