can any one share the step by step method to use UART using code warrior(using processor expert) , and sample program .
Hi Joseph,
You can find a UART example using local loopback mode for the TWR-K20D72M on the following path of your CodeWarrior installation files:
C:\Freescale\CW MCU v10.4\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K20D72M\Serial
This project is a simple demonstration of using serial port in loopback mode with interrupts. At first, receive buffer is prepared. Then a message is sent to UART (AS1 - Serial component). Program waits for OnBlockSent event to detect when the message is sent completely. In the next step the program waits for OnBlockReceived event. Number of sent and received characters are compared, as well as the sent and received messages. Comments and test results are sent to ConsoleUART (Serial component) on Tower Serial Module (TWR-SER).
RS232 settings:
38400baud rate, 8-bit, 1-stop bit, no parity.
The components used are:
AS1 (Serial) - UART to be tested
ConsoleIO (Serial) - UART on TWR-SER module for console output
You can find more information about these components by making a right click on them and selecting "Help on component".
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------