Hello,
I'm working with the AT91RM9200 - the USART is already configurated and works but I don't know how I could use the printf-function for the usart.
Now I'm sending a character with this function - it works, but it's ver uncomfortable if I want to send one sentence or numbers...
char a[11] = "Hallo Welt"; for(int i=0; i<11; i++) { while( !(COM1->US_CSR & AT91C_US_TXRDY) ) continue; COM1->US_THR = (a[i] & 0xFF); }
Is there a possibility to use the printf-function for the first USART / not the DEBUG-Unit at the AT91?
printf("Hello World\n");
best regards Johannes
thanks for your answer...
could you show me a small example how I have to configurate this c-file for my controller?
Hello Johannes Meier,
you have to enable Retargetting to use printf.
Adapt file RETARGET.c to your microcontroller and add it to your project. File RETARGET.C can be found in ..\Keil\ARM\Startup.
Best Regards, Martin Guenther
View all questions in Keil forum