why UART is not working in STM32 nucleo 144 Board?

Viewed 22

I am using Nucleo L552ZE-Q Board and Realterm terminal,but after debugging, terminal is blank.Here with I have attached the code.It shows no error and no warnings,Led is toggling.I am using LPUART1,Baudrate 115200 bits/s. Any help would be appreciated.Thank you

enter code here
#include "main.h"
/* Private variables ---------------------------------------------------------*/
UART_HandleTypeDef hlpuart1;
DMA_HandleTypeDef hdma_lpuart1_rx;

RTC_HandleTypeDef hrtc;

/* USER CODE BEGIN PV */
uint8_t myTXData[13]="Hello all \n";
uint8_t myRXData[11];

/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_DMA_Init(void);
static void MX_RTC_Init(void);
static void MX_LPUART1_UART_Init(void);
 int main(void)
 {
 
 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */
 SystemClock_Config();

/* USER CODE BEGIN SysInit */

/* USER CODE END SysInit */

/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_RTC_Init();
MX_LPUART1_UART_Init();
/* Infinite loop */
/* USER CODE BEGIN WHILE */
 while (1)
{
  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */
    HAL_UART_Transmit(&hlpuart1,myTXData,13,10);
    HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port,LED_GREEN_Pin);
    HAL_Delay(500);
} 
/* USER CODE END 3 */
}

pin details

0 Answers
Related