UART Transmitting issue or any other issue
Hi Everyone,
I am using STM32F407DISCO board and made a simple program which transmit some values. The program is as follows
#include "stm32f4xx_hal.h"
#include "main.h"
UART_HandleTypeDef USART2Config;
void GPIO_Init(void);
void UART2_Init(void);
void Err_Handle(void);
char data[] = "Hello";
uint8_t value = 43;
uint16_t value2 = 1024;
char buffer[10];
int main(){
HAL_Init();
GPIO_Init();
UART2_Init();
HAL_GPIO_WritePin(GPIOD, RED_LED, 1);
HAL_GPIO_WritePin(GPIOD, GREEN_LED, 1);
HAL_GPIO_WritePin(GPIOD, ORANGE_LED, 1);
HAL_GPIO_WritePin(GPIOD, BLUE_LED, 1);
HAL_UART_Transmit(&USART2Config, (uint8_t*) data, strlen (data), HAL_MAX_DELAY);
HAL_UART_Transmit(&USART2Config, &value, 1, HAL_MAX_DELAY);
HAL_UART_Transmit(&USART2Config, (uint8_t*) &value2, sizeof(value2), HAL_MAX_DELAY);
while(1){
}
}
The code above only Transmit line 28 and 29, Line 30 not transmitted.
but when I comment out Line 28 then line 29 and 30 transmitted.
What I am doing wrong here?
Following is the logic analyzer waveform when Line no 28,29 and 30 are transmitted.

Following is the logic analyzer waveform when Line no 29 and 30 are transmitted

Kindly correct me where I am making mistake.
Thanks and best regards
