2025-02-04 11:47 AM - edited 2025-02-04 11:51 AM
I have created my first PCB with a STM32C011F6P6 on it, but I am not able to measure a GPIO I set high from my testpoint.
I am setting PB6 high the following way:
I flashed the code to the MCU via the cube ide and it told me that everything went fine.
This is what cubemx generated for the gpio init:
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_RESET);
/*Configure GPIO pin : PB6 */
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
I have it wired the following way:
Where PB6 is exposed through a test point. Measuring the voltage at that test point, or directly on the leg of the chip tells me that it is connected to GND though, instead of being set high.
Am I missing something?
Solved! Go to Solution.
2025-02-04 12:11 PM
There was a short on the test point to GND.
2025-02-04 12:11 PM
There was a short on the test point to GND.