USART2 works but other USARTS don't work. (STM32F446RE)
Hello,
I am struggling to use multiple USARTs. I tested that USART2 works fine but I cannot get USART1 and USART3 to work.
If I can't use multiple USARTs at the same time, I would like to use only USART3. However, USART3 does not work. Do I need to change settings on the Windows to use different USART?
I am using STM32F446 nucleo board and using Putty to see serial port on windows.
Any help would be very appreciated!
Thank you
void SendInitString(void)
{
uint8_t Test3[] = "Hello World 33 !!!\r\n"; //Data to send
HAL_UART_Transmit(&huart3,Test3,sizeof(Test3),10);// Sending in normal mode
uint8_t Test2[] = "Hello World 22 !!!\r\n"; //Data to send
HAL_UART_Transmit(&huart2,Test2,sizeof(Test2),10);// Sending in normal mode
uint8_t Test1[] = "Hello World 11 !!!\r\n"; //Data to send
HAL_UART_Transmit(&huart1,Test1,sizeof(Test1),10);// Sending in normal mode
HAL_Delay(1000);
}
int main(void)
{
/* USER CODE BEGIN 1 */
/* 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_USART3_UART_Init();
MX_USART2_UART_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
SendInitString();
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
