2021-08-18 02:58 AM
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?
2021-08-18 03:29 AM
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
2021-08-19 02:42 AM
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
2021-08-20 02:56 AM
Figured it out by using CubeWB package v1.12.1
Thanks!
2021-08-23 10:30 AM
You can use the CubeIDE project under CubeWB package v1.12.1:
STM32Cube_FW_WB_V1.12.1\Projects\NUCLEO-WB15CC\Examples\QSPI\QSPI_ReadWrite_DMA
Imen