2025-03-11 1:53 AM
When I use STM32G474 for SPI communication and configure it to host、 Received only mode, and use hal_spi_receive_dma() to start communication,the number of clocks is always one byte more than I want.For example,if i want to receive 3byte data and configure HAL_SPI_TransmitReceive_DMA(xx, xx, 3),there will be 4byte clocks on the clock lines. How to solve this problem?
2025-03-11 2:49 AM
Receive-only mode sends clocks continuously. Use two-direction mode and leave MISO uninitialized instead.