Is someone using the LSM6DSL with SPI using BSP Custom driver?
Hi everyone, I'm using an STM32L4 microcontroller and a LSM6DSL MEMS. They are conected with the spi2 interface and for configuring everithing I'm using STMCubeIDE.
I'm able to use the MEMS without BSP Custom, but when I try to set the BSP, it doesn't work at all.
Here the code I used to link BSP with SPI:
/* Link SPI functions to the LSM6DSL driver */
io_ctx.BusType = LSM6DSL_SPI_4WIRES_BUS;
io_ctx.Init = BSP_SPI2_Init;
io_ctx.DeInit = BSP_SPI2_DeInit;
io_ctx.ReadReg = BSP_SPI2_SendRecv;
io_ctx.WriteReg = BSP_SPI2_Send;
io_ctx.GetTick = BSP_GetTick;
LSM6DSL_RegisterBusIO(&MotionSensor, &io_ctx);
I have read on internet that it works fine with I2C, but it seems to be a little tricky to set it up with SPI.
Anyone could help?
Thanks
Gabriele
