Question
How to ensure that an SPI master sends exactly 16 clock pulses to the slave?
I'm using this current sensor: TLI4970-D050T4 According to the datasheet:

How can the SPI master send exactly 16 clock pulses to the slave? I'm using L432KC Nucleo running at 2 MHz, but the SPI clock has been prescaled to 1 MHz. I would appreciate any advice. This is the code that I use to read the sensor and calculate current:
while (1)
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_SPI_Receive(&hspi1, (uint8_t *)&SPIRx, 2, 10);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
motorCurrent=motor_current();
float motor_current() {
float Iout;
float BIout;
int16_t Bit15;
Bit15 = SPIRx&0x8000;
if(Bit15==0x8000){
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, GPIO_PIN_SET);
}
else {
BIout= SPIRx&0x1FFF;
Iout = (BIout-4096)/80;
}
return Iout;
}