TWR-K60N512-KEIL Freescale Semiconductor, TWR-K60N512-KEIL Datasheet - Page 124

no-image

TWR-K60N512-KEIL

Manufacturer Part Number
TWR-K60N512-KEIL
Description
K60N512 Keil Tower Kit
Manufacturer
Freescale Semiconductor
Series
Kinetisr
Type
MCUr

Specifications of TWR-K60N512-KEIL

Rohs Compliant
YES
Contents
4 Boards, Documentation, DVD
Peak Reflow Compatible (260 C)
Yes
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
Freescale Tower System, K60N512
Example code
13.4 Example code
The DCD example code sends a message to a terminal showing what type of host is
attached to the USB module. To be able to test the three different types of hosts it is
necessary to have a special tool. Because the standard is new only a few companies have
support for this. The tool that Freescale uses is the Allion USB battery Charging Test
feature. Using this tool and a regular PC is enough to emulate any host and test the DCD
module. For more information about the Allion USB battery Charging Test feature, go to:
http://www.allion.com/TestTool/USB_Charging.pdf
The code waits until the USB cable is attached, sending 5 V to PTB0. After the software
detects the rising edge in the VBUS signal, starts the DCD detection sequence, and waits
until the sequence is completed or the module sends an error notification.
The next three windows show the result of each host type.
Software Explanation—The software is simple. This section will explain in detail how to
set the clocks, USB, and I/O pins to run the DCD example.
124
1. First, configure one I/O pin as input. In this example PTB0 is used for the VBUS
detection.
FLAG_SET(SIM_SCGC5_PORTB_SHIFT,SIM_SCGC5);// Enable clock for PTB
PORTB_PCR0=(0|PORT_PCR_MUX(1));// configure PTB0 as I/O pin
Kinetis Quick Reference User Guide, Rev. 0, 11/2010
Figure 13-2. DCD demo results
Freescale Semiconductor

Related parts for TWR-K60N512-KEIL