cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769I-DISC1, NUCLEO-F767ZI Virtual COM port in Windows 10 with Tera Term printf issue [root cause was blocking socket]

rudolf.pribis
Associate II

I have an issue with printf redirection to Virtual COM port. It only works after I load program using STM32 ST-LINK Utility and unplug and plug cable.

Does anybody have an idea what could be the issue?

Thanks Rudo

3 REPLIES 3
Piranha
Chief II
rudolf.pribis
Associate II

Thanks for the suggestion. I am using latest firmware obtained from STM32 ST-LINK Utility.

I observed that the COM port communication got stuck after my program get stuck on socket read..., specifically here (ethernetif.c)

void ethernetif_input( void const * argument )

{

 struct pbuf *p;

 struct netif *netif = (struct netif *) argument;

 for( ;; )

 {

   if (osSemaphoreWait( s_xSemaphore, TIME_WAITING_FOR_INPUT)==osOK)

   {

     do

     {  

       p = low_level_input( netif );

It seems that my task got suspended while waiting and therefore I even cannot reach the read time out.

(just to complete the story, I am trying for NTP client)

sorry for misalignment... my issue was that socket was not set as not blocking

// set not blocking
	int on = 1;
	if((nRet = lwip_ioctl(*sockfd, FIONBIO, &on)))
			printf("lwip_ioctl failed with %d\r\n", errno);