Skip to main content
ALai.2
Associate
Aug 18, 2021 9:58 AM UTC
Question

Example QSPI_ReadWrite_DMA does not work on STM32WB5MMG board

I am working on STM32WB5MMG board and using the example QSPI_ReadWrite_DMA.

In the main function the program can not run into case 2 to call HAL_QSPI_Transmit_DMA

Source Code as below:

   case 2:

    if(StatusMatch != 0)

    {

     StatusMatch = 0;

     TxCplt = 0;

     /* Enable write operations ----------------------------------------- */

     QSPI_WriteEnable(&hqspi);

     /* Writing Sequence ------------------------------------------------ */

     sCommand.Instruction = EXT_DUAL_IN_FAST_PROG_CMD;

     sCommand.AddressMode = QSPI_ADDRESS_2_LINES;

     sCommand.DataMode  = QSPI_DATA_2_LINES;

     sCommand.NbData   = BUFFERSIZE;

     if (HAL_QSPI_Command(&hqspi, &sCommand, HAL_QSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)

     {

      Error_Handler();

     }

     if (HAL_QSPI_Transmit_DMA(&hqspi, aTxBuffer) != HAL_OK)

     {

      Error_Handler();

     }

     step++;

    }

    break;

After investigation I found that StatusMatch is not updated, it always is 0.

which means callback function HAL_QSPI_StatusMatchCallback is not called.

then I tried to set USE_HAL_QSPI_REGISTER_CALLBACKS to 1 and register the callback function

and still not figure out the issue(HAL_QSPI_StatusMatchCallback is not called)

Can any one provide your suggestion?

This topic has been closed for replies.

4 replies

ST Technical Moderator
Aug 18, 2021 10:29 AM UTC

Hello @ALai.2​ and welcome to the Community :)

Which board revision are you using?

Which CubeWB package version are you using?

I run the QSPI_ReadWrite_DMA example on STM32WB55MM-DK board (revB) and I have seen no issue.

Please make sure to use the latest version STM32CubeWB (v1.12.1) and follow the instructions in the readme.txt file.

If this issue is reproduced with the latest release, please provide more information about the behavior observed.

When you perform a break, is the code in the ErrorHandler() function ?

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
ALai.2
ALai.2Author
Associate
Aug 19, 2021 9:42 AM UTC

Thanks for your reply.

My board revision is STM32WB5MMG-DK.

From the STM32CubeIDE I can't find any QSPI Read write example  for my board STM32WB5MMG-DK.

Can you provide me an example to evaluate the performance of Read/Write NOR by Quad SPI for board STM32WB5MMG-DK?

Thanks!

Andy Lai

ALai.2
ALai.2Author
Associate
Aug 20, 2021 9:56 AM UTC

Figured it out by using CubeWB package v1.12.1

Thanks!