This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf with cmsis library

Hello
I use printf for sending out data from USART ports.


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 when I use printf function. Unfortunately when I want to use Ethernet library from cmsis this command "printf" hangs my mcu and when I change printf with USART_SendData(USART1,ch); my mcu works fine.

I have added this libraries.

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

what is my mistake?