How to configure OctoSPI and QuadSPI with an STM32?
1. OctoSPI
You can find the detailed example with explanation in
MOOC - STM32H72x/3x hands-on workshop - 6 Code execution from external FLASHIn this MOOC page you will find the link to the video and the full set of materials to download.
Application Note describing OctoSPI is
AN5050: Octo-SPI interface on STM32 microcontrollers
2. QuadSPI
QuadSPI is very similar to OctoSPI, the MOOC mentioned above can be used as reference QuadSPI as well.
Application Note describing QuadSPI is
AN4760: Quad-SPI interface on STM32 microcontrollers and microprocessors