cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h7 D1/D0 GPIO

wjian.2
Associate II
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);
 
 
}
1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

stm32h747i-disco  @F.Belaid

Repeatedly reposting basically the same topic to multiple threads is not helpful, pick one and stick with it.

https://community.st.com/t5/stm32-mcu-products/stm32h747i-disco-gpio-gpio-mode-af-pp-function/td-p/584573

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
Up vote any posts that you find helpful, it shows what's working..

@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 you find my answers useful, click the accept button so that way others can see the solution.

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
Up vote any posts that you find helpful, it shows what's working..