Skip to main content
A.Caliskan
Associate III
Dec 6, 2021 5:56 AM UTC
Solved

stm32 RCC Register ?

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.
Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Dec 6, 2021 10:34 AM UTC

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.

14 replies

waclawek.jan
Super User
Dec 6, 2021 8:08 AM UTC

Which STM32, exactly?

Don't you try to set reserved bits?

JW

A.Caliskan
Associate III
Dec 6, 2021 8:19 AM UTC

STM32H723

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

Peter BENSCH
ST Technical Moderator
Dec 6, 2021 8:11 AM UTC

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
Dec 6, 2021 8:36 AM UTC

Can you show an example ?

waclawek.jan
Super User
Dec 6, 2021 9:05 AM UTC

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

JW

Peter BENSCH
ST Technical Moderator
Dec 6, 2021 9:28 AM UTC

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
Dec 6, 2021 9:35 AM UTC

0693W00000HncwJQAR.png

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Dec 6, 2021 10:34 AM UTC

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.