2021-12-05 09:56 PM
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.
Solved! Go to Solution.
2021-12-06 02:34 AM
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
2021-12-06 12:08 AM
Which STM32, exactly?
Don't you try to set reserved bits?
JW
2021-12-06 12:11 AM
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
2021-12-06 12:19 AM
STM32H723
Don't you try to set reserved bits? (YES)
2021-12-06 12:36 AM
Can you show an example ?
2021-12-06 01:05 AM
I don't see ICSCR in the RCC registers in RM0468.
JW
2021-12-06 01:28 AM
An ICSCR only exists in the STM32G0, STM32G4, STM32L0, STM32L4, STM32L5, STM32U5, STM32WB.
Are you sure you are debugging an STM32H723?
2021-12-06 01:35 AM
2021-12-06 02:34 AM
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
2021-12-06 03:59 AM
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.