AnsweredAssumed Answered

Problem with printf on F0

Question asked by hospodar.ivan on Mar 7, 2013
Latest reply on Mar 8, 2013 by hospodar.ivan
Hello, I have project in Keil for demonstrating USART on STM32F0.
Program is working fine with putc, but with printf it isn´t working (building of program finish success in both case). Why printf isn´t work? My main.c is here:

#include "stm32f0xx.h"
#include "periph_init.h"
#include <stdio.h>


int fputc(int ch, FILE *f)  
{
  USART_SendData(USART1, (uint8_t) ch);
  while (USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET) 
  {}                                                                
  return ch;
}
  

int main(void)


  periph_init ();
  
  printf("print");


  while (1);             
}


Outcomes