cancel
Showing results for 
Search instead for 
Did you mean: 

Why OCTOSPI registers aren't accessible on NUCLEO-L4R5ZI-P?

AGEBE.1
Associate II

Hi,

I'm trying to configure manually OCTOSPI registers in order to implement Hyperbus protocol but when I try to write registers it has no effect...

I'm using that command:

OCTOSPI1->CR = OCTOSPI1->CR | (0x1 << 0);

But the register keep it's value 0.

1 ACCEPTED SOLUTION

Accepted Solutions

>>But where did you find this information?

I understand the problem space, an elephant with a tesseract if you will..

https://www.st.com/resource/en/reference_manual/dm00310109-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

0693W00000Bbp9vQAB.jpg0693W00000BbpAUQAZ.jpg

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

View solution in original post

6 REPLIES 6
Imen.D
ST Employee

Hello @AGEBE.1​ ,

Have a look at this article, which will help you to configure OctoSPI, it's applicable for STM32L4 series.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Can you see any other registers, are they all zero?

Make sure all clocks are enabled

  1. //enable peripherals
  2. RCC->AHB3ENR |= RCC_AHB3ENR_OSPI1EN;
  3. RCC->AHB2ENR |= RCC_AHB2ENR_OSPIMEN;

On H7 there's also IOMNGREN (AHB3) OCTOSPI*M*

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

The other peripherial was all zero yes.

But thank you, you solved my problem!

AGEBE.1
Associate II

0693W00000BbnorQAB.pngBut where did you find this information?

I can't find the bit associated to OSPI. According to stm32l4r5xx.h file, this bit is supposed to be the 8th of this register:

#define RCC_AHB3ENR_OSPI1EN_Pos             (8U)

>>But where did you find this information?

I understand the problem space, an elephant with a tesseract if you will..

https://www.st.com/resource/en/reference_manual/dm00310109-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

0693W00000Bbp9vQAB.jpg0693W00000BbpAUQAZ.jpg

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

Thanks a lot!