cancel
Showing results for 
Search instead for 
Did you mean: 

Debug pins have different behaviour after reset than the other pins. Is there a way to change this?

SErbo
Associate

Specifically, PortA.15 pin goes "HIGH" after reset for 5ms. It can be seen on picture. (Blue is the VDD supply, yellow is PortA.15) PortA.15 pin has an alternate function “SYS_JTDI�?. This situation cannot be seen on other pins which configured the same way with PortA.15.

Here is the config for ports:

/*Configure GPIO pins : WG1_BUZZER_Pin/*PortA.4*/ fLASH_CS_Pin MOTOR1_Pin/*porta.15*/ */

 GPIO_InitStruct.Pin = WG1_BUZZER_Pin|fLASH_CS_Pin|MOTOR1_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

1 REPLY 1

> Debug pins have different behaviour after reset than the other pins. Is there a way to change this?

No. During reset, PA15 has switched on its internal pullup, see the GPIO chapter in RM. Duration of reset depends on which particular STM32 model are you using, and you neglected to tell that to us - see in the datasheet for that model the "reset temporization" parameter, but it may be several milliseconds. You may shorten this a bit if you place the port reset into the reset handler, but not below the temporization duration.

You can use a hard enough external pulldown to override the effect of internal pullup, at the cost of the resistor, increased current load on the pin and increased power consumption when the pin is driven high.

JW