cancel
Showing results for 
Search instead for 
Did you mean: 

Hello I am trying to establish single-byte receive on stm32f091 controller by polling mode but unable to do it . Do i need to monitor any flag or clear any of the flag. Please suggest some solution.

MKuma.8
Associate

uint8_t tx_Data[4]="AT\r\n";

uint8_t tx_Data_A[26]="ATFY0K0C0R0S30=64S0=0@L1\r\n";

uint8_t tx_Data_B[5]="ATD\r\n";

uint8_t rx_Modem0[40];

uint8_t rx_Modem1[40];

HAL_UART_Transmit(&huart1, tx_Data, 4, 400);

//HAL_Delay(500);

HAL_UART_Receive(&huart1,rx_Modem0, 40, 2000);

HAL_UART_Transmit(&huart1, tx_Data_A, 26, 400);

//HAL_Delay(500);

HAL_UART_Receive(&huart1,rx_Modem0, 40, 2000);

HAL_UART_Transmit(&huart1, tx_Data_B,5, 10);

//HAL_Delay(500);

HAL_UART_Receive(&huart1,rx_Modem0, 40, 1000);

0 REPLIES 0