GPIOB3 is enable while STLINK is running
Hi everyone,
I am running en.x-cube-spin14 sample code for X-NUCLEO-IHM14A1 (STSPIN820 stepper motor driver) on a nucleo64 board with STM32F411RE
Before any move of the stepper motor this code is executed:
if (HAL_GPIO_ReadPin(BSP_MOTOR_CONTROL_BOARD_PORT_TIM_STCK,\
BSP_MOTOR_CONTROL_BOARD_PIN_TIM_STCK) != 0)
{
__enable_irq();
return 0;
}BSP_MOTOR_CONTROL_BOARD_PORT_TIM_STCK = GPIOB
BSP_MOTOR_CONTROL_BOARD_PIN_TIM_STCK = 3
Step Clock pin (GPIOB3) at 1 is considered a forbidden configuration.
If I step thru the program with STLINK running the pin is reading 1 as soon as clock on GPIOB3 is enable and the above code exit with 0 to the error handler and the program get stuck into an infinite loop.
If I terminate the debug session and reset the board the program is running without any problem.
From the schematic of the board I notice that pin 3 of PORTB is connected also to T_SWO signal of the on board STLINK.
I need to run a debug session to check some of my code.
Any idea how to solve this problem?
Thanks
