Skip to main content
BBlas
Associate
March 20, 2019
Solved

QUADSPI MDMA problem

  • March 20, 2019
  • 4 replies
  • 1773 views

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).

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

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.

4 replies

BBlas
BBlasAuthorBest answer
Associate
March 21, 2019

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.

Technical Moderator
March 21, 2019

Hello,

Are you faced this issue with latest version of CubeH7?

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
BBlas
BBlasAuthor
Associate
March 22, 2019

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

Technical Moderator
April 10, 2019

Hi,

This issue will be fixed in the coming releases.

Thank you for bringing this to our attention.

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks