how to configure uart in k20d72m using processor expert in codewarrior10.4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to configure uart in k20d72m using processor expert in codewarrior10.4

850 Views
josephxavier
Contributor III

step by step instruction to configure processor expert for UART  communication and code warrior code for UART communication.

Board TWR-K20D72M

IDE codewarrior 10.4

0 Kudos
Reply
1 Reply

681 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

I am using the latest version of CodeWarrior 10.6.4 but the following instructions are the same as for CodeWarrior 10.4.

When you create a new Bareboard project for the K20DX256 (72MHz family) with Processor Expert enabled (select File > New > BareBoard project in the main menu and follow the wizard dialogs) . You can add UART driver by the following way:

- Open the Components Library window, Alphabetical tab and double click on AsynchroSerial component (add the component into your project).

- Double click on the component  in the Components window (open the Component Inspector of the AsynchroSerial component).

- Select the Baud rate (e.g. write 9600 into the Baud rate property)

- Select the Channel (UART device) and RxD, TxD pins (if the default selection is not correct for your target board)

- Generate Processor Expert code, see below:

pastedImage_1.png

Open the context menu of the AsynchroSerial component and select "Help on Component", select link "Component AsynchroSerial Typical Usage", see the screenshot below.

The Typical Usage contains examples of code for this component (Send and Receive of data).

pastedImage_4.png

Best Regards,

Marek Neuzil