2026-04-13 6:44 AM
I have a STM32WB05TZF6TR. All VCCs are running off 1.8V. I'm trying to use PA8 and PB5 with 3.3V 10k pullups. But the signals are being clamped at 2.5V. I had expected this not to happen, as they are supposed to be 5V tolerant.
Does anyone know what's happening here? There's nothing connected to the pins besides the pullups.
I have a bare STM32CubeMX project, with just this GPIO init:
void MX_GPIO_Init(void){
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/*Configure GPIO pin : PB5 */
GPIO_InitStruct.Pin = GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : PA8 */
GPIO_InitStruct.Pin = GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
}
Much appreciated,
David
2026-04-14 1:20 AM
A 5V tolerant pin does not mean it can be pulled to 3.3V in every mode and supply condition. With the chip powered at 1.8V, the pin is probably being clamped by its protection structure at about: VDD+0.6...0.8V = 2.4...2.6V. So your ~2.5V reading is expected. If you want to avoid that, you should use a level shifter or an input current limit set by a series resistor.
Regards
/Peter
2026-04-14 1:42 AM
You beat me to it ...
This 2.5V - 1.8V difference looks a lot like the average VF (forward voltage) of a p-n junction, probably a protective diode.
2026-04-14 4:14 AM - edited 2026-04-14 4:23 AM
Thank you for your reply Peter
I'm a bit confused, as I believed 5V tolerant pins did not have the same protection structure, allowing the voltage to go up to 5V.
For example, on the STM32F407 you're allowed to apply a voltage up to VDD + 4V:
The STM32WB datasheet doesn't seem to specifically mention the FT pin characteristics, besides stating:
In what situations would the STM32WB05 5V tolerant pins actually be 5V tolerant in that case?
2026-04-30 8:12 AM
When initialised as input, the PA and PB ports are indeed 5V tolerant - if the internal pull resistors are deactivated. I assume that this will still be corrected in the data sheet.
Regardless of the initialisation you performed in your programme with
GPIO_InitStruct.Pull = GPIO_NOPULL;
it is possible that the pull-ups or pull-downs are re-enabled by low-power functions. You should therefore ensure that the pulls on the relevant pins are disabled at the appropriate points in your programme using
(to be found in stm32wb0x_hal_pwr_ex.c/.h).
By the way, there is also an LL function in stm32wb0x_ll_pwr.h for checking the pull status:
Hope that helps?
Regards
/Peter