Skip to main content
AGEBE.1
Associate II
Jun 23, 2021 11:32 AM UTC
Solved

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

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.

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 23, 2021 4:32 PM UTC

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

6 replies

ST Technical Moderator
Jun 23, 2021 12:12 PM UTC

Hello @AGEBE.1​ ,

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

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Tesla DeLorean
Guru
Jun 23, 2021 12:12 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
AGEBE.1
AGEBE.1Author
Associate II
Jun 23, 2021 1:37 PM UTC

The other peripherial was all zero yes.

But thank you, you solved my problem!

AGEBE.1
AGEBE.1Author
Associate II
Jun 23, 2021 1:43 PM UTC

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)

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 23, 2021 4:32 PM UTC

>>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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
AGEBE.1
AGEBE.1Author
Associate II
Jun 24, 2021 8:12 AM UTC

Thanks a lot!