Can not configure the HAL_SPI_Receive() funciton to provide 8 clock cycles to the CLK pin.
Hi everyone.
I'm working on NUCLEO-F303RE board to acquire mouse sensor displacament data to the MCU to be processed. Mouse sensor has an SPI interface which is 2 wires (CLK and SDIO). So i configured my SPI3 peripheral accordingly on CUBEMX and it works for x-displacement reading. But when i try to read y-displacement after reading x-displacement, i can not get y data. I think this is due to 16 clock cycles which HAL_SPI_Receive() function provides. Displacement data are 8-bits but this function provides 16 clock cycles. So the last 8 clocks could be some commands (read-write) on the mouse sensor side with reference to the SDIO pin's state. So how can this function be configured to have 8-clock cycles to have a synchronised SPI communication? Or do you have another solutions for this issue?
Thank you for your answers.
#[STM32CubeHAL/LL]
