Solved
UART not working as expected
Hi,
When I run the below code, I get the result on serial console as in below image which is not as expected. Could you please let me know what I am missing here ?


int main(void)
{
/* USER CODE BEGIN 1 */
DWT->CTRL |=(1<<0);
/* USER CODE END 1 */
/* 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_USART2_UART_Init();
/* USER CODE BEGIN 2 */
SEGGER_UART_init(250000);
SEGGER_SYSVIEW_Conf();
//SEGGER_SYSVIEW_Start();
uint8_t data[]= "message \r\n";
//sprintf(usr_msg,"demo of binary semaphore usage between 2 tasks\r\n");
HAL_UART_Transmit(&huart2, data,sizeof(data),HAL_MAX_DELAY);
