Cut and paste this URL to share the unmodified register and value:
https://regviz.com/r/STMicroelectronics/STM32F042x/DBGMCU/CR#0x0
Debug MCU Configuration Register
Debug Stop Mode
Debug Standby Mode
https://github.com/cmsis-svd/cmsis-svd-data