cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 RCC Register ?

A.Caliskan
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

14 REPLIES 14

Which STM32, exactly?

Don't you try to set reserved bits?

JW

Peter BENSCH
ST Employee

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.

STM32H723

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

Can you show an example ?

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

JW

Peter BENSCH
ST Employee

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.

0693W00000HncwJQAR.png

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.

Thank u your ansver. I wonder if you could take a look at my other posts, I'm having a lot of trouble with adc.,, in stm32h7 series.