it is difficult to get the cause from your limit information and code, but before you get ADC value every time, it is better like below example:HAL_ADC_Start( &ARD_hadc ); // start ADC conversionwhile( (ADC1->ISR & ADC_FLAG_EOC) == 0 );adc_value = HA...
you can use command window in your STM32programmer install folder to execute 'STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe -c port=SWD mode=UR freq=4000 -rdu -hardrst' command to try.this command is to change RDP to level 0.
it looks like onboard STlink MCU has some problem, if you can't changed onboard stlink MCU(STM32F103 or STM32F723) by new one, the only way is to use external debugger to connect by onboard tag-connect connector.
Hi, maybe the cause is because your clock for USART1 and USART2 is different, for USART1 the clock is form APB1 but for USART2 the clock is from APB2, so the BaudRate is different, you can check it.