steps for using uart on k20d72m using codewarrior 10.4

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

steps for using uart on k20d72m using codewarrior 10.4

938 次查看
josephxavier
Contributor III


can any one share the step by step method to use UART using code warrior(using processor expert) , and sample program .

标签 (1)
0 项奖励
回复
1 回复

751 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

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!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复