Question
Hi, I'm having trouble sending data through SPI on the STM32L476RG with CubeIDE.
In my debugging, I noticed something wierd with this line of code from HAL_SPI_Transmit macro :
hspi->Instance->DR = *((uint16_t *)hspi->pTxBuffPtr);pTxBuffPtr being the Transmit Buffer which, in my case, is txBuff[1] the first element of a one-element array containing the register (0x50) to read in my sensor (the BME280 pressure sensor).
Well, the above line of code seems not to do the job as DR instance of hspi is equal to 0 after the execution of the line.
for further details, the txBuff array is of uint8_t type
Could someone help with this?
Rest regards
