2019-04-14 11:51 PM
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
2019-04-15 10:48 AM
You can use this to rule out PC related problems:
2019-04-16 01:35 AM
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)
2019-04-17 12:57 AM
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);