cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the name of the USART handle

OIp.1
Associate III

Hi. I am going through the STM32 Step by Step instructions, as well as going through the "Description of STM32F7 HAL and low-layer drivers" manual. I am using the STM32756-EVAL board so I have made some appropriate changes based on the pins and ports used.

One of the functions from the instructions page is to transmit a message through UART.

HAL_UART_Transmit(&huart2,Test,sizeof(Test),10);

This function, based on my reading of the HAL manual, has the following inputs.

> UART_HandleTypeDef * huart, uint8_t * pTxData, uint16_t Size, uint32_t Timeout

In the example, we are provided with the input text for huartx to be called. But I am wondering where, in the HAL manual, can the input for huart be found, as I have not been able to find where, in the HAL manual or otherwise, it is given that the UART handle should be "huartx".

Please let me know if more information is required.

12 REPLIES 12
OIp.1
Associate III

Thank you very much. I'm assuming there isn't any official documentation on how CubeMX picks the names given the somewhat ad-hoc nature of this method. Is there any adverse effects on the projects from having separate files for the peripheral initialization?

More files, more clutter.

"More files, more clutter."

But easier with version control

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.