cancel
Showing results for 
Search instead for 
Did you mean: 

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

LOMO
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4

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

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

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

really appreciate!