Skip to main content
LOMO
Associate III
March 29, 2023
Solved

Unable to configure SYSCFG->CFGR1 reg when init UCPD on stm32g0

the Dead Battery Signals have been selected in stm32cubeMX, but when it run to "MODIFY_REG(SYSCFG->CFGR1, (SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE), ConfigDeadBattery);",SYSCFG->CFGR1 keeps default value.the clock is enabled. 0693W00000aPN9jQAG.png

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
March 29, 2023

According to RM, these two bits are write-only (w), not read-write (rw), so even if you write 1 into them and they work as intended, they may not read 1 back.

0693W00000aPNiyQAG.png 

JW

4 replies

waclawek.jan
Super User
March 29, 2023

Which STM32? What is your hardware - a Nucleo board, or your own board?

Can you change SYSCFG->CFGR1in debugger?

Can you change other SYSCFG_CFGR1 bits?

JW

LOMO
LOMOAuthor
Associate III
March 29, 2023

stm32G071CB , my board ,i Can change other SYSCFG_CFGR1 bits in debugger.

waclawek.jan
waclawek.janBest answer
Super User
March 29, 2023

According to RM, these two bits are write-only (w), not read-write (rw), so even if you write 1 into them and they work as intended, they may not read 1 back.

0693W00000aPNiyQAG.png 

JW

LOMO
LOMOAuthor
Associate III
March 29, 2023

really appreciate!