Skip to main content
Associate II
November 12, 2023
Solved

Screen is terminating

Hi, I'm using an STM32F401RE board for a class(programming using MacOS). Right now, I'm using VSCode and make to edit and compile my code, then using stlink to flash it. All I'm trying to do is print hello world to the tty.usbmodem* screen in the /dev/ directory. To do this, I'm using the screen /dev/tty.usbmodem* but all I'm getting is [screen is terminating] anyone know why?

Here is my code:

while (1) {

HAL_GPIO_TogglePin(GPIOA, LD2_Pin);
strcpy((char*)buf, "hello world!\r\n");
HAL_UART_Transmit(&huart2, buf, strlen((char*)buf), HAL_MAX_DELAY);
HAL_Delay(500);

}

This topic has been closed for replies.
Pavel A.
Pavel A.Best answer
November 12, 2023

This is probably because you're using "screen" as a terminal app. Try a terminal app that is better suited for serial ports, more robust. 

2 replies

AllanLiuAuthor
Associate II
November 12, 2023

NVM. Got it to work, plugging and unplugging it somehow solved the issue???

Pavel A.
Pavel A.Best answer
November 12, 2023

This is probably because you're using "screen" as a terminal app. Try a terminal app that is better suited for serial ports, more robust.