L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
usart.c File Reference

This file provides code for the configuration of the USART instances. More...

#include "usart.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for usart.c:

Go to the source code of this file.

Functions

void MX_USART1_UART_Init (void)
 Initialise USART1 (huart1) as configured by STM32CubeMX. Sets baud rate, word length, stop bits, parity, and hardware flow control for the debug / trace UART. Call MX_DMA_Init() first so that the DMA channel is ready for DMA-based TX.
void HAL_UART_MspInit (UART_HandleTypeDef *uartHandle)
void HAL_UART_MspDeInit (UART_HandleTypeDef *uartHandle)

Variables

UART_HandleTypeDef huart1
 UART handle.
DMA_HandleTypeDef hdma_usart1_tx
 DMA handle.

Detailed Description

This file provides code for the configuration of the USART instances.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file usart.c.

Function Documentation

◆ HAL_UART_MspDeInit()

void HAL_UART_MspDeInit ( UART_HandleTypeDef * uartHandle)

USART1 GPIO Configuration PB6 ------> USART1_TX PB7 ------> USART1_RX

Definition at line 141 of file usart.c.

Referenced by vcom_DeInit().

Here is the caller graph for this function:

◆ HAL_UART_MspInit()

void HAL_UART_MspInit ( UART_HandleTypeDef * uartHandle)

Initializes the peripherals clocks

USART1 GPIO Configuration PB6 ------> USART1_TX PB7 ------> USART1_RX

Definition at line 79 of file usart.c.

References Error_Handler(), and hdma_usart1_tx.

Here is the call graph for this function:

◆ MX_USART1_UART_Init()

void MX_USART1_UART_Init ( void )

Initialise USART1 (huart1) as configured by STM32CubeMX. Sets baud rate, word length, stop bits, parity, and hardware flow control for the debug / trace UART. Call MX_DMA_Init() first so that the DMA channel is ready for DMA-based TX.

Definition at line 35 of file usart.c.

References Error_Handler(), and huart1.

Referenced by main(), and vcom_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hdma_usart1_tx

DMA_HandleTypeDef hdma_usart1_tx

DMA handle.

Definition at line 31 of file usart.c.

Referenced by DMA1_Channel1_IRQHandler(), HAL_UART_MspInit(), and vcom_Resume().

◆ huart1

UART_HandleTypeDef huart1