Question
stm32h747i-disco gpio GPIO_MODE_AF_PP function
If i configure D1 pj8 as tx for uart8,D0 pj9 as rx for uart8.When i conect to led directly D0(rx) could let led on but D1(txno in this case should be right ?Both pin with GPIO_MODE_AF_PP//PULLUP
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOJ_CLK_ENABLE();
__HAL_RCC_UART8_CLK_ENABLE();
/*Configure GPIO pin: PJ8 For D1 pin for TX */
GPIO_InitStruct.Pin = GPIO_PIN_8;
//GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP; //pullup
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF8_UART8;
HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
/*Configure GPIO pin: PJ9 For D0 pin for RX */
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; //MODE_ALTERNATE?
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF8_UART8;
HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
}
