Skip to main content
Explorer
December 9, 2024
Solved

operation of HAL_SPI_TransmitReceive_DMA

  • December 9, 2024
  • 1 reply
  • 1087 views

This question is about the operation of HAL_SPI_TransmitReceive_DMA.

When HAL_SPI_TransmitReceive_DMA(&hspi1 ...) is being transmitted (assumed SPI communication_A) and HAL_SPI_TransmitReceive_DMA(&hspi1 ...) is called (assumed SPI communication_B) SPI communication_A will be canceled and SPI communication_B will be executed? Or is SPI communication_B executed after SPI communication_A is completed?

    This topic has been closed for replies.
    Best answer by STea

    Hello @pass3master ,

    HAL_SPI_TransmitReceive_DMA will wait for the first transmit/receive operation as the second one will be blocked by HAL lock and unlock process and HAL state busy or ready.
    Regards

    1 reply

    STeaAnswer
    ST Employee
    December 9, 2024

    Hello @pass3master ,

    HAL_SPI_TransmitReceive_DMA will wait for the first transmit/receive operation as the second one will be blocked by HAL lock and unlock process and HAL state busy or ready.
    Regards

    Explorer
    December 9, 2024

    Thank you for your response. I understand how it works, so I will consider it “resolved”.