cancel
Showing results for 
Search instead for 
Did you mean: 

Switch from OctoSPI1 to OctoSPI2

TNeub.1
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions
TNeub.1
Associate III

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.

View solution in original post

3 REPLIES 3
TNeub.1
Associate III

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.

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
Up vote any posts that you find helpful, it shows what's working..

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