cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 Delay block with OSPI in QSPI configuration

EvoFrank
Associate

I notice the delay block doesn't seem to be configurable for the OSPI peripheral in QSPI mode. Does any one know if it is still possible to use the delay block with a QSPI clock? I've tried coding the delay block a few different ways but it doesn't seem to work.

3 REPLIES 3

Which U5 device? What device in QSPI mode?

I've interfaced Winbond W25Q devices to several models of U5 boards without needing this.

U545 don't have OSPIM or secondary interface.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KDJEM.1
ST Employee

Hello @EvoFrank and welcome to the Community 🙂,

For STM32U5 devices, the delay block is an independent peripheral that can be configured for the Octo-SPI interface.

I suggest you to check the DLYBYP bit of the OCTOSPI_DCR1 register.

-->I've tried coding the delay block a few different ways but it doesn't seem to work.

Could you please give more details about how you coded the delay block?

Are you using STM32CubeMx to generate code?

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi All, Sorry for the delay in responding.

To clarify I'm using a U585.

--> Are you using STM32CubeMx to generate code?

I do not have the option of enabling the delay block in CubeMX if I configure the OSPI peripheral to work in QSPI mode. This makes me think that perhaps one cannot use the delay block in QSPI mode, see screenshot below:

QSPI.png

I can manually modify the generated code for the OSPI peripheral from:

hospi1.Init.DelayBlockBypass = HAL_OSPI_DELAY_BLOCK_BYPASSED;

to

hospi1.Init.DelayBlockBypass = HAL_OSPI_DELAY_BLOCK_USED;

However, it seems that modifying OspiDLYBCfg.Units and OspiDLYBCfg.Phase doesn't seem to make any difference to whether data is Tx/Rx'd correctly at a given clock frequency.