Skip to main content
wjian.2
Associate III
August 23, 2023
Solved

stm32h7 D1/D0 GPIO

If i configure D1 pj8 as tx for uart8,D0 pj9 as rx for uart8.When conect to led direct D0 could let led on but D1 no this case should be right ?
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);
 
 
}
This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
August 25, 2023

Solved  https://community.st.com/t5/stm32-mcu-products/uart8-get-only-get-noise-in-stm32h747i-disco/td-p/584007

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

5 replies

ST Technical Moderator
August 23, 2023

Hello @wjian.2 :

Could you please provide more details, which STM32 product you are using?

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
wjian.2
wjian.2Author
Associate III
August 23, 2023

stm32h747i-disco  @wjian.2F.Belaid

Karl Yamashita
Principal
August 23, 2023

@wjian.2

I have a Nucleo-H723ZG where I was using a CAN transceiver on the Zio connector. After failure to get the CAN bus communcation working. I started to troubleshoot and I found that the schematic did not label the CAN RX/TX correctly. It was off by one pin. 

If it's possible, you might want to ohm out the D1 which I assume is on the Arduino connector to the uC pin to see if there is a direct connection? 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Tesla DeLorean
Guru
August 23, 2023
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
August 25, 2023
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..