Skip to main content
A.Caliskan
Associate III
December 6, 2021
Solved

stm32 RCC Register ?

  • December 6, 2021
  • 14 replies
  • 3754 views

While looking at the rcc registers, you can see the ICSCR register on the debug screen, but when I write on the program, I encounter an error, I wonder what is the reason.0693W00000HnbiQQAR.png0693W00000HnbiLQAR.png

This topic has been closed for replies.
Best answer by Peter BENSCH

Hmm, there still seems to be an incorrect designation in STM32CubeIDE: the register at 0x58024404 is correctly called RCC_HSICFGR according to RM0468, Section 8.7.3. It is also defined as HSICFGR in stm32h723xx.h.

Its bits [30:24] can e.g. be set with an access of this type:

RCC->HSICFGR |= (value << 24) // value: bit30...24, i.e. 0x00...0x7F

Please keep in mind, you should read out the bits beforehand and clear them (e.g. &), then modify the bits read out and write them back using the or (|) mentioned above.

Regards

/Peter

14 replies

waclawek.jan
Super User
December 6, 2021

Which STM32, exactly?

Don't you try to set reserved bits?

JW

A.Caliskan
Associate III
December 6, 2021

STM32H723

Don't you try to set reserved bits? (YES)

Peter BENSCH
ST Technical Moderator
December 6, 2021

The RCC_ICSCR is not completely free for write access, see the reference manual of the respective derivative.

If you want to write the rw bits, you have to access them bytewise.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
A.Caliskan
Associate III
December 6, 2021

Can you show an example ?

waclawek.jan
Super User
December 6, 2021

I don't see ICSCR in the RCC registers in RM0468.

JW

Peter BENSCH
ST Technical Moderator
December 6, 2021

An ICSCR only exists in the STM32G0, STM32G4, STM32L0, STM32L4, STM32L5, STM32U5, STM32WB.

Are you sure you are debugging an STM32H723?

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
A.Caliskan
Associate III
December 6, 2021

0693W00000HncwJQAR.png

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
December 6, 2021

Hmm, there still seems to be an incorrect designation in STM32CubeIDE: the register at 0x58024404 is correctly called RCC_HSICFGR according to RM0468, Section 8.7.3. It is also defined as HSICFGR in stm32h723xx.h.

Its bits [30:24] can e.g. be set with an access of this type:

RCC->HSICFGR |= (value << 24) // value: bit30...24, i.e. 0x00...0x7F

Please keep in mind, you should read out the bits beforehand and clear them (e.g. &), then modify the bits read out and write them back using the or (|) mentioned above.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.