cancel
Showing results for 
Search instead for 
Did you mean: 

skills: How to read DBUMCU correct without debugging

yqiu.11
Associate

I am useing ADC with STM32H743ZIT6 device.when i debugging,i find that the device can't read DBGMCU vale correct,although I read the 0x5C001000 address directly, i was so confused. Fortunately, I found the following skill.So

 

Step 1 : Download you firmware,you will find that your STM32 device does not printed correct DBGMCU value.

Step 2 : Power down your system.

Step 3 : Power on your system.

Step 4: You will find that your STM32 device has printed correct DBGMCU value.

 

Test code is here(printf is bound with USART1)

int main(void) { CPU_CACHE_Enable(); HAL_Init(); SystemClock_Config_PLL_HSI(); sys_uart1_config(); uint32_t val = 0; val = LL_DBGMCU_GetRevisionID(); printf("rev val = 0x%08X\r\n", val); val = LL_DBGMCU_GetDeviceID(); printf("dev_val = 0x%08X\r\n", val); while(1) { } }

So, i think we could not read DBGMCU when debugging.

Best wishes

sscom2.bmp

 

0 REPLIES 0