Need help on M5211DEMO UART program

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on M5211DEMO UART program

1,229 Views
Contributor I
Hi all,

I'd like to write a simple program to test the UART on M5211DEMO board. My program just needs to get a character sent by the PC COM1 port. Since I am a newbie to this board, can anyone help me get started?

Thank you.
Labels (1)
0 Kudos
2 Replies

16 Views
Specialist I
If you're using Codewarrior, take a look in the (Codewarrior Examples) directory. There are several example programs in there, one which has some UART code. This should help jump-start your work.

---Tom
0 Kudos

16 Views
Contributor I
Thank you very much for your reply.

Yes, I'm using the CodeWarrior software version 6.3. I looked into the (CodeWarrior Examples) folder and saw that M5208EVB using UART codes. However, the program does not show me how to read a character from UART. Are these the following steps we should do to use the UART in M5211DEMO board:
1. Initialize UART by uart_init(0, 83333, 19200, 0)
2. Wait for a character being present at the UART by uart_getchar_present(0)
3. If a character is present, read it by uart_getchar(0)

Please let me know if I'm missing out anything or is it the right process to do with UART?

Thank you very much.
0 Kudos