This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

when send data to usart with printf in arm keil which port is active

hello
I write blow code with STcubemx and arm keil.
I want to send a string data from MCU TO GSM module for calls.
but nothing happend, when programing the chip.
my question is , when send serial data with printf command , which port that command is sent (I use STM32F103C8T6 that has 3 usart)

how can I reslove this problem?


char phoneNO[]="093XXXXXX";

int main(void)
{

  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_USART2_UART_Init();

    printf("AT");
    HAL_Delay(1000);
    printf("ATD");
    printf(phoneNO);
    HAL_Delay(8000);
    printf("ATH");

  while (1)
  {
  }

.