Skip to content

Commit

Permalink
ensure that PTP is low after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
houkhouk authored and nicolas-rabault committed Feb 2, 2024
1 parent c227143 commit fb10344
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/projects/NUCLEO-G431KB/gate_serialcom/src/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, RESET);
}

/* USER CODE BEGIN 2 */
Expand Down

0 comments on commit fb10344

Please sign in to comment.