2021-02-04 07:02 AM
My pins seem to just be floating even though, i have set them to specific levels.
the only one, that works properly is Pin 3 on 3.3 V.
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_2, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
HAL_Delay(5000);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
I have set them as outputs in the configuration, So they should be working right?
I'm thankful for any help.
2021-02-04 07:38 AM
Hi MSchn.3 (Community Member),
On product which product/Board are you working on?
Check your gpio clock settings and gpio configuration in cubeMx.
Regards
2021-02-04 08:34 AM
Get final answer when running in the debugger and deciphering the GPIO registers.
2021-02-04 11:51 PM
Hi OlivierK, I'm working on the nucleo-WL55JC1 Board.