2022-05-12 01:47 AM
Hi Team,
I'm working with the STM32H745I-DISCO board for UART communication. As I'm working with UART, I'm able to get the data through UART3 from STLINK. But I also need same communication through UART 1 and UART4. Could you please help me with the exact ports and pins needs to be connected for individual UARTs for the transmission?
Thanks
2022-05-12 02:33 AM
Hello,
Please check the datasheet here:
https://www.st.com/resource/en/datasheet/stm32h745zg.pdf
If I understood well, from page 88, you will find what you want.
2022-05-12 02:44 AM
Couldn't you look at the schematic and datasheet?
USART1_TX PB6 ARD_D1
USART1_RX PB7 ARD_D0
USART2_TX PD5 STMOD2 via SB16
USART2_RX PD6 STMOD3 via SB12
UART4_TX PA0 STMOD1 via SB19
UART7_TX PB4 ARD_D10
UART7_RX PA8 ARD_D5
2022-05-12 04:14 AM
Hi,
Thank you for replying to our query. But we have tried this for UART7 and UART1. All our hardware set-up seem to be correct but we are not able to get the proper output. By using UART1 we are able to establish the communication but getting junk data in the hyper terminal. Are there any parameters need to be added to get correct data?
Thanks
2022-05-12 05:06 AM
Difficult to tell without code, but most of the time it revolves around one of these points:
1 - check your UARTx input clock in SystemClock_Config() function
2 - check proper pins initialization in HAL_UART_MspInit(UART_HandleTypeDef *huart)
3 - check config in MX_UARTx_UART_Init(void)
2022-05-12 05:13 AM
No, shouldn't require any magic.
The UARTs output at CMOS levels, not RS232 compatible ones, so pay attention or describe your means of connection better.
Unfortunately not psychic, so you'll need to explain the details with more precision.
2022-05-12 06:28 AM
As already noted, the exact microcontroller ports & pins will be in the microcontroller's datasheet.
To find how those pins are then routed on the Disco board, you will need to study the User Manual (including the schematics) for that board.
You will also need to pay attention that the board isn't using those pins for other onboard functions/features...
2022-05-12 10:36 PM
2022-05-12 10:48 PM
Hi Team,
I have already attached and sent one file (main.h file) in the previous reply accidently . We have been able to make the USART communication possible with USART3 but not with any other UARTs. We tried with USART1 but getting only junk data. We have only modified the main.h file for USART1(changed the ports also accordingly) and the main.c file is as it is.
I'll also attach the main.c file along with this reply. Please take a look into it.
We are using Keil IDE.
Thank you.
2022-05-13 12:54 AM
So have you reviewed the chip's datasheet and the board's User Manual (including the schematics) to answer the fundamental hardware questions of pins and board routing?
There's no use going to code before that's established...