2025-10-03 12:48 AM - last edited on 2025-10-03 1:53 AM by mƎALLEm
Title edited by a ST moderator to reflect the content.
Hello,
STM32CubeMX Version:6.15.0
STM32CubeH7 Firmware Package V1.12.0 / 30-October-2024
This Is My QSPI Configure in STM32CubeMX
1、When I Start QSPI Work in main function,The QSPI Will always work。QSPI work on CM4-Core。
source:
The QSPI CS signal wave,which Delta Time is 13us,not big than 1s according code:
2、When I Start QSPI Work in FreeRTOS Thread,The QSPI-CS signal Always High,and clock is always out 。QSPI work on CM4-Core。
source:
The CS Signal is always High, And clock signal is always output.The next is qspi-clock signal:
My Question is:
1、When I Start QSPI transmit-receive in main() function, It will always work, no stop. It's CS-signal always output low and high. Why?
2、When I Start QSPI transmit-receive in FreeRTOS thread, It does not work, CS-signal is always High, and clock is always output.
I Have No Idea to solve it after many trial, Could You Have Some Idea?
Solved! Go to Solution.
2025-10-07 7:09 AM
Hello @lianyan
What is the error you are getting?
Using polling mode in an RTOS environment is not ideal, as it blocks the thread and can be preempted by higher-priority tasks. For QSPI operations, consider using interrupt or DMA modes, which are more suitable and efficient for RTOS-based applications.
2025-10-03 1:27 AM
Hello @lianyan
You can check the example for QSPI on the STM32H747I-EVAL board available on GitHub (STM32CubeH7/Projects/STM32H747I-EVAL/Examples/QSPI/QSPI_MemoryMappedDual at master · STMicroelectronics/STM32CubeH7 · GitHub ) . It’s a simple and well-structured example that can help you verify and validate your QSPI configuration effectively. Reviewing this example could give you a reference point for your implementation.
Br
2025-10-03 7:00 AM
After My Test,I Can Confirm:QSPI will work OK when before osKernelInitialize() and osThreadNew() function; Not Ok when QSPI work after osKernelInitialize() and osThreadNew() function, also not ok when work in thread.
The below figure, is CSn signal, period is 1s, matched The code function
2025-10-07 3:44 AM
Hello @lianyan
Could you please provide your current interrupt priority settings? The QSPI interrupt priorities should be configured with a lower priority (that is, a higher numerical value) than those assigned to the OS kernel.
2025-10-07 6:41 AM
Hello,
As you can see in source code, I do not use interrupt for QSPI.
2025-10-07 7:09 AM
Hello @lianyan
What is the error you are getting?
Using polling mode in an RTOS environment is not ideal, as it blocks the thread and can be preempted by higher-priority tasks. For QSPI operations, consider using interrupt or DMA modes, which are more suitable and efficient for RTOS-based applications.
2025-10-07 7:19 AM
hello,
In blocking transmit function,It always timeout when waiting for TC and another flags.
I do not use QSPI anymore, and use SPI now.