Skip to main content
TNeub.1
Associate III
June 17, 2022
Solved

Switch from OctoSPI1 to OctoSPI2

Hello,

currently we are successfully using an external NOR flash connect via Hyperbus on OCTOSPI1, ClockPort 1 for some time (~1.5 year).

We would like to switch to OCTOSPI2 because we want to use the other address area (0x70000000UL instead of 0x90000000UL).

According to the reference manual and CubeMX this should work without changing any pins.

So we replaced in our software:

OCTOSPI1 --> OCTOSPI2

__HAL_RCC_OSPI1_CLK_ENABLE --> __HAL_RCC_OSPI2_CLK_ENABLE

Every other parameter is unchanged, since we want to control the exact same device.

But it doesn't work. We receive a timeout in HAL_OSPI_Transmit() -> OSPI_WaitFlagStateUntilTimeout().

We are using the HAL init and configuration routines from STM32H7CubeH7 version 1.10.0 (drivers 1.10.0).

Any idea what we missed? Thank you!

This topic has been closed for replies.
TNeub.1
TNeub.1Best answer
Associate III
June 28, 2022

As it seems like, the "problem is", when using OCTOSPI2 over ClockPort1 you also have to enable the OSPI1 clock.

So only when both clocks are enabled, it works.

Can somebody confirm this? I didn't find this hint in the reference manual.

3 replies

TNeub.1
TNeub.1AuthorBest answer
Associate III
June 28, 2022

As it seems like, the "problem is", when using OCTOSPI2 over ClockPort1 you also have to enable the OSPI1 clock.

So only when both clocks are enabled, it works.

Can somebody confirm this? I didn't find this hint in the reference manual.

Tesla DeLorean
Guru
June 28, 2022

It probably needs the OCTOSPIM enabled too.

As there is plumbing/routing of signals P1 vs P2 and upper and lower banks of signals.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TNeub.1
TNeub.1Author
Associate III
June 30, 2022

Thank you. This was already enabled. But yes, without it doesn't work.