HAL_SPI_Transmit() API
I observed the data on both MOSI and MISO on logic analyzer, even when I use only one of the HAL_SPI_Transmit() or HAL_SPI_Receive(), why?
I observed the data on both MOSI and MISO on logic analyzer, even when I use only one of the HAL_SPI_Transmit() or HAL_SPI_Receive(), why?
This time only, for fun.
Part 1: chatGPT:
When using the HAL_SPI_Transmit() or HAL_SPI_Receive() functions on the STM32, the MOSI and MISO lines are both active. The MOSI line is used to send data from the STM32 to the slave device, while the MISO line is used to receive data from the slave device. Even if you are only transmitting or receiving data in one direction, the MOSI and MISO lines may still be active as the slave device might be configured to send dummy data on the MISO line. Additionally, some slave devices may require that the MOSI line be driven with a specific value (such as a "0") during idle periods to properly function.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.