cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating from Quad SPI STM32H750 to Octo SPI STM32H733

SMoon.2
Associate III

Background: We have a board that uses Quad SPI on STM32H750 to interface with Macronix MX25L12833F Flash.  We are using the flash to support a large firmware image (with XIP).

 

We are attempting to take this hardware and drop in STM32H733.  Doing this will require using the OSPI interface in Quad SPI mode. Specifically OCTOSPI2, using Port 1 (Clk, IO[3:0], NCS).  

I'm attempting to port the configuration/setup/driver (using HAL APIs).  I've matched the clocking to the flash (133 MHz) from the H750 project.  I've been able to read/write the configuration registers using single SPI commands, and I've also been able to read and verify the correct device ID.  So I'm communicating with the flash on some level.

 

However, whenever I try to do quad writes and reads (non-memory mapped at this point), I'm not having any success.  Similarly, even single SPI read/writes don't seem to work yet.  I've reviewed the documentation, application notes, and examples provided by ST.  I initially used the code generation feature of STM32CubeIDE to get a baseline before adding code based on our previous driver and ST code, AN, etc. I haven't been able to scope the hardware yet, that will be my next stop - but I'm looking for anyone that has had experience doing this.  Is there a common issue I'm missing?  Is there something specific I should be looking at?

 

Thanks in advance.

1 REPLY 1

https://community.st.com/t5/stm32-mcus-products/stm32cubemx-configuration-of-the-octospi-for-quad-spi-nor-flash/m-p/166280#M33812

The OSPI/HSPI/XSPI models are very similar, ST added things to their structures, changed some names, but materially very similar. Make sure to clear local/auto variables, the compiler doesn't by default, and your left with random stack junk.

For the MX25L12833F to get it and the xSPI interface into the appropriate modes for 1,2 and 4-bit modes should be mechanically very similar.

I could make a demo if such thing had sufficient value..

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