2023-01-26 01:36 AM
Hello,
I am facing an issue with nCS pin of QSPI on STM32H747BIT.
Reference manual indicates that SCLK is supposed to wait one period after nCS fall before starting operations :
But I do not observe this wait on my board.
*Yellow is the clock
*Blue is the nCS signal
Here is my QSPI configuration :
hqspi.Instance = QUADSPI;
hqspi.Init.ClockPrescaler = 111;
hqspi.Init.FifoThreshold = 32;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE;
hqspi.Init.FlashSize = 21;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE;
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
hqspi.Init.FlashID = QSPI_FLASH_ID_2;
hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
Then I use the following commands to communicate with my peripheral (APS6404L-SQH QSPI PSRAM) :
HAL_QSPI_Command(&hqspi, &APS_QSPI_Command, HAL_QSPI_TIMEOUT_DEFAULT_VALUE);
HAL_QSPI_Receive(&hqspi,buffer,HAL_QSPI_TIMEOUT_DEFAULT_VALUE) ;
The small wait period I saw with scope seems to decrease when clock frequency increase.
This behavior does not prevent me from using my peripheral with a clock lower or equal to 20MHz. But I cannot increase the clock frequency whereas the peripheral is supposed to run up to 144MHz.
It is possible that routing is not good enough to handle higher frequencies, but the behavior I saw doe not seem to match the specification.
What did I miss?
Solved! Go to Solution.
2023-01-26 06:21 AM
My mistake, if it can help anyone, I forgot to set pin speed to Very High with OSPEEDR registers.
With very high-speed Clock signal waits one period before any operation as expected.
2023-01-26 06:21 AM
My mistake, if it can help anyone, I forgot to set pin speed to Very High with OSPEEDR registers.
With very high-speed Clock signal waits one period before any operation as expected.