Commit 465fb02d authored by Khaoula Bidani's avatar Khaoula Bidani Committed by Erwan Gouriou
Browse files

stm32cube: stm32h7xx: drivers: Correct DMA source and destination addresses



The source and destination addresses in the HAL_MDMA_Start_IT call were swapped,
causing incorrect data transfers. The data buffer (pData) should be the source,
and the OSPI data register (DR) should be the destination. This commit fixes the
argument order to ensure proper data transmission via DMA.

Signed-off-by: default avatarKhaoula Bidani <khaoula.bidani-ext@st.com>
parent a6b27192
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -75,4 +75,9 @@ Patch List:
     Impacted file: 
      stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_sdio.c
         
   *Fix an issue in the STM32H7 HAL OSPI by correcting the DMA source and destination
      addresses in the HAL_MDMA_Start_IT() call.
      Impacted files:
      stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_ospi.c

   See release_note.html from STM32Cube
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,7 @@ HAL_StatusTypeDef HAL_OSPI_Transmit_DMA(OSPI_HandleTypeDef *hospi, uint8_t *pDat
        }

        /* Enable the transmit MDMA Channel */
        if (HAL_MDMA_Start_IT(hospi->hmdma, (uint32_t)&hospi->Instance->DR, (uint32_t)pData, hospi->XferSize, 1) == \
        if (HAL_MDMA_Start_IT(hospi->hmdma, (uint32_t)pData, (uint32_t)&hospi->Instance->DR, hospi->XferSize, 1) == \
            HAL_OK)
        {
          /* Enable the transfer error interrupt */