cancel
Showing results for 
Search instead for 
Did you mean: 

QUADSPI MDMA problem

BBlas
Associate II

Hello,

I am working on indirect read of quadspi using MDMA. Regular pooling worked fine without any problem.

I have 4 line dual buffer QSPI circuit. I used HAL function

HAL_QSPI_Receive_DMA(&hqspi, data);

No data read from qspi. Moreover I have found inside this function (file stm32h7xx_hal_qspi.c) at line 1268:

/* Enable the MDMA transfer by setting the DMAEN bit in the QSPI CR register */
SET_BIT(hqspi->Instance->CR, QUADSPI_CR_DMAEN);

This bit is defined as:

#define QUADSPI_CR_DMAEN_Pos             (2U)                                  
#define QUADSPI_CR_DMAEN_Msk             (0x1U << QUADSPI_CR_DMAEN_Pos)        /*!< 0x00000004 */
#define QUADSPI_CR_DMAEN                 QUADSPI_CR_DMAEN_Msk                  /*!< DMA Enable */

This bit is clearly marked as reserved in reference manual on page 876. It is clearly just copied from stm32f7 which had this bit.

So my question is: Was this function ever tested? Are there any code examples for QUADSPI MDMA read on STM32H7 or usage procedure (what registers to set to program MDMA and QSPI).

1 ACCEPTED SOLUTION

Accepted Solutions
BBlas
Associate II

Resolved.

Line at 1268 does nothing - BUG in HAL.

Changed to FIFO full MDMA trigger and inside HAL_Recieve_DMA changed data size to word instead of byte. Works fine.

View solution in original post

4 REPLIES 4
BBlas
Associate II

Resolved.

Line at 1268 does nothing - BUG in HAL.

Changed to FIFO full MDMA trigger and inside HAL_Recieve_DMA changed data size to word instead of byte. Works fine.

Imen.D
ST Employee

Hello,

Are you faced this issue with latest version of CubeH7?

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
BBlas
Associate II

I think it is the latest HAL H7 version 1.3.2.

You should also check CubeMx 5.1.0. After the update it becomes useless for me. Quadspi peripheral settings does not allow to set chip select. The drop down menu is missing and program instruct me to set the chip select through not existent menu.

Blazej

Imen.D
ST Employee

Hi,

This issue will be fixed in the coming releases.

Thank you for bringing this to our attention.

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen