Associate
December 17, 2020
Solved
Setting specific GPIO_Output pins high/low
- December 17, 2020
- 6 replies
- 2129 views
I am able to set pins (high/low) that I have specified to be GPIO_Output in the Pinout& Configuration tab of the .ioc file.
Using the code written below (changing the pin number) I am able to observe the expected behaviour on a oscilloscope using all of the PA pins except (PA2,PA3 and PA8).
Why am I not able to observe the behaviour on these pins? I am using the STM 32L072 Nucleo-64.
Thanks in advance
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_SET);
HAL_Delay(100);
// HAL_ADC_Start(&hadc);
// HAL_ADC_PollForConversion(&hadc,HAL_MAX_DELAY);
// raw = HAL_ADC_GetValue(&hadc);
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_15,GPIO_PIN_RESET);
HAL_Delay(500);
}