I have a problem trying to stop a timer in debug mode.
I am using a NUCLEO-F072RB. I use timer 7, one of the basic timers, to generate an interrupt.
In order to be able to stop the timer in debug, mannually with breakpoint, I set the DBGMCU_APB1_FZ as stated in the reference manual (RM0091, 32.9.4).
My code is the following:
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
/* Configure the system clock */
/* Initialize all configured peripherals */
/* USER CODE BEGIN 2 */
DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_TIM7_STOP;
When I run the debugger, none of the DBG registers changes its values and the timer doesn't stop when stopping execution.
I would like to know where the DBGMCU configuration lines should be placed, or if there is something else that needs to be configured.
Thanks in advance,