cancel
Showing results for 
Search instead for 
Did you mean: 

printf and network setting problem (cmsis)

parisa
Senior
Posted on September 14, 2016 at 15:18

Hello

I have added this code to my project to use printf as command to send USART's data

struct __FILE { int handle;} ;
FILE __stdout;
FILE __stdin;
FILE __stderr;
int fputc(int ch, FILE *f) 
{
while(!USART_GetFlagStatus(USART1,USART_FLAG_TXE)); 
USART_SendData(USART1,ch); 
return ch; 
}

it works fine.However when I try to use Ethernet this command hang my MCU but if I use

USART_SendData(USART1,ch); 

it works fine again.I want to know why this command doesn't work properly after I use cmsis Ethernet library. I added this library for Ethernet

(RTOS->keil RTX)
(CMSIS Driver->ethernet MAC(API))
(CMSIS Driver->ethernet PHY(API))
Device(GPIO)
Network(core + interface + socket->TCP/UDP)

0 REPLIES 0