- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not understand how to make printf() work with uart in psoc3 i put this code:
#include
#include "stdio.h"
char putchar(char c)
{
UART_WriteTxData((uint8)c);
return c;
}
int main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
UART_Start();
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
for(;;)
{
printf("Hello");
CyDelay(500);
}
}
but in the hyperterminal does not show de message correctly, instead "HELLO" it shows "HLOEL" so it did send the caracters but doesn't sended FIFO
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Tx command is non blocking, I suspect printf() does not
check its write status either, so you might try a status of Tx
before you return from the TxWrite ?