Why can not change DBGMCU->CR in STM32F103
I'm use STM32F103C8T6. I use DBGMCU->CR = DBGMCU_CR_TRACE_IOEN to change the value of DBGMCU->CR, but the operation is failed after POR, the register is alway read 0.
I suspect that the cause of this problem is the the debug component is not be powered up or not be clocked, so I try to power up debug component by set DP CTRL/STAT register to 0x50000000 by sending data to SWD port, and then the DBGMCU->CR can be changed as expected.
So my question is: how to power up debug component from application directly, rather than using the debug port?