Skip to content

Commit f6167f6

Browse files
committed
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: Khaoula Bidani <[email protected]>
1 parent 468e5ad commit f6167f6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

stm32cube/stm32h7xx/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,9 @@ Patch List:
6868
Impacted files:
6969
stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_sdio.c
7070

71+
*Fix an issue in the STM32H7 HAL OSPI by correcting the DMA source and destination
72+
addresses in the HAL_MDMA_Start_IT() call.
73+
Impacted files:
74+
stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_ospi.c
75+
7176
See release_note.html from STM32Cube

stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_ospi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ HAL_StatusTypeDef HAL_OSPI_Transmit_DMA(OSPI_HandleTypeDef *hospi, uint8_t *pDat
14951495
}
14961496

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

0 commit comments

Comments
 (0)