cancel
Showing results for 
Search instead for 
Did you mean: 

Delay Chip select line STM32U5 OSPI

LCorb.2
Associate II

I am using the NUCLEO-U575ZI-Q.

I am using the OSPI peripheral in QSPI mode.

The device I am communicating with needs a longer delay after the CS line is asserted low.

I have tried setting the "ChipSelectHighTime" to 8, but I think this only affects the "number of clocks which the chip select must remain high between commands." I do not believe this controls the timing of a delay after the CS is asserted. 

I also looked into the "Delay Block"; however, this looks like it controls delays for reads only if I understand it correctly. 

LCorb2_0-1744062313679.png

 

4 REPLIES 4

How long of a delay?

Could you drive the pin as a GPIO manually around HAL_OSPI interactions?

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 @LCorb.2,

 

Could you please check the refresh rate and the chip select boundary.

Refresh rate (REFRESH) required for PSRAMs memories. The chip select must go high each (REFRESH x OCTOSPI clock cycles), configured depending on the memory datasheet.

Chip select boundary (CSBOUND) configured depending on the memory datasheet. The chip select must go high when crossing the page boundary (2^CSBOUND bytes defines the page size).

For more information about the configuration of OCTOSPI parameters, I recommend you to look at AN5050 Table 8. STM32CubeMX - Configuration of OCTOSPI parameters.

 

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.

I am not running a PSRAM, I was hoping for a delay after the CS went low to add extra time before the clock and data are transmitted.  THE CSBOUND would be a different functionality.

Yes, this works, but I need this all automated with DMA for performance.  AAdding a manual GPIO toggle is quite a long delay; I was looking for a few extra clock cycles worth of delay.