cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h747i-disco gpio GPIO_MODE_AF_PP function

wjian.2
Associate II
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);
 
 
}
3 REPLIES 3
TDK
Guru

You've created at least 3 topics on this issue over the past few days. Perhaps follow through with those instead of reposting?

If you feel a post has answered your question, please click "Accept as Solution".

if i reply some question noone answer my reply,and i wait a few hours no one reply,but those Evangelists never answer a other day, for this reason  i  created ,if it not right I‘m sorry.

Its a forum, you're not paying for real-time support, people are situated all over the world, and have jobs. Opening new threads doesn't change the dynamics.

There seems like there's a very fundamental issue here, like the codes not running, or the boards damaged, or you're not looking at the right pins. Going to need to do some hands on debugging and sanity checking. Do you have a second board, or a colleague who can work with you directly?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..