cancel
Showing results for 
Search instead for 
Did you mean: 

Screen is terminating

AllanLiu
Associate II

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);

}

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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. 

View solution in original post

2 REPLIES 2
AllanLiu
Associate II

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

Pavel A.
Evangelist III

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.