An introduction to nxpusblib. March 2012



Similar documents
AN10866 LPC1700 secondary USB bootloader

Freescale MQX USB Device User Guide

The care and feeding of Pythons at the Redmond Zoo. (Using Micro Python and pyboard with Windows)

How To Add A Usb Secondary Ipo Bootloader To An Lpc23Xx Flash Device To A Flash Device

How To Use Nuc123 (Nuc123) For A Week

Programmazione Microcontrollori

Design Considerations in Adding USB Communications to Embedded Applications

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Migrating Application Code from ARM Cortex-M4 to Cortex-M7 Processors

TivaWare USB Library USER S GUIDE SW-TM4C-USBL-UG Copyright Texas Instruments Incorporated

UM1734 User manual. STM32Cube USB device library. Introduction

ElektorLive Eindhoven 20 november 2010

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

Application Note: AN00141 xcore-xa - Application Development

smxusbd USB Device Stack

Lab Experiment 1: The LPC 2148 Education Board

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

How To Develop A Toolstick

Atmel AVR4950: ASF - USB Host Stack. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Smartphone Quick-Jack Solution FASTER TO PRODUCT FASTER TO MARKET

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

Embedded Display Module EDM6070

STM32F102xx and STM32F103xx series Microcontrollers

2. Scope of the DE0 Board and Supporting Material

Freescale Semiconductor, I

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

Complete Integrated Development Platform Copyright Atmel Corporation

Embedded Component Based Programming with DAVE 3

Figure 1. 8-Bit USB Debug Adapter

APPLICATION NOTE. AT17284: Proximetry Cloud Based Smart Plug User Guide. SMART ARM-based Microcontrollers. Introduction. Features

Tutorial for MPLAB Starter Kit for PIC18F

LPCXpresso v7 User Guide

Embedded Development Tools

AT89C5131A Starter Kit... Software User Guide

USB OTG and Embedded Host Microchip Technology Incorporated. All Rights Reserved. Slide 1

Useful USB Gadgets on Linux

AN10811 Programming SPI flash on EA3131 boards Rev May 2009 Application note Document information Info Content Keywords Abstract

Using WinUSB in a Visual Studio Project with Freescale USB device controller

Learning USB by Doing.

LPC4330-Xplorer. Quick Start Guide: LPC4330-Xplorer. User Manuals for Xplorer:

Freescale MQX RTOS USB Host User s Guide

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

Adding WiFi to Your Embedded System. WPG Americas & Gainspan Titus Wandinger (WPG) & Su Li (Gainspan) April 23, 2013

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

NXP & Security Innovation Encryption for ARM MCUs

Ways to Use USB in Embedded Systems

Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze

Freescale USB Device Stack Users Guide

Getting Started with Kinetis SDK (KSDK)

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

STM32F4DISCOVERY. Discovery kit with STM32F407VG MCU. Features. Description

AN249 HUMAN INTERFACE DEVICE TUTORIAL. Relevant Devices This application note applies to all Silicon Labs USB MCUs. 1.

Crown Field Support Engineering

STM32 F-2 series High-performance Cortex-M3 MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Using DAVE with MDK Version 5

UM1969 User manual. Getting started with STM32F746G discovery software development tools. Introduction

Board also Supports MicroBridge

AVR287: USB Host HID and Mass Storage Demonstration. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AN10860_1. Contact information. NXP Semiconductors. LPC313x NAND flash data and bad block management

Which ARM Cortex Core Is Right for Your Application: A, R or M?

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

Verizon Wireless 4G LTE USB Modem 551L Software Upgrade

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

USB Human Interface Joystick Demonstration Create a HID USB Device (sample Joystick) By Jared St.Clare, October 2009 Version 1

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

SmartFusion csoc: Basic Bootloader and Field Upgrade envm Through IAP Interface

Programming the VEX Robot

UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

Shearwater Research Dive Computer Software Manual

Virtual COM Port Driver Installation Manual

ScreenBeam Configuration Utility (Windows 8.1/10) User Manual. Solutions for the Digital Life. Ver 1.2

USER GUIDE EDBG. Description

Motor Control using NXP s LPC2900

Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU

Virtual COM Port Driver Installation Manual

Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension

Cypress CY7C64225 USB-to-UART Setup Guide Version 1.3

Getting started with the X-CUBE-SOUNDTER1 sound terminal software expansion for STM32Cube

Gerard Fianen. Copyright 2014 Cypherbridge Systems LLC Page 1

Current Cost Data Cable User Guide. Installing and configuring the data cable

Instructions for Installing and Using the FOCUS DL-15 Data Transfer Software

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Introduction to Keil uvision and ARM Cortex M3

AN AES encryption and decryption software on LPC microcontrollers. Document information

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Software User Guide UG-461

Audio player on KwikStik

Bluetooth 4.0 Solutions for Apple ios Devices. Bluegiga Technologies

Sprint 3G/4G Plug-in-Connect USB Web Browser Interface User Guide

MeshBee Open Source ZigBee RF Module CookBook

Keri USB-A Connection and Configuration

Robust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

Transcription:

An introduction to nxpusblib March 2012

Agenda NXP USB portfolio Demo using LPC1800- Out of the Box What is nxpusblib? How to use nxpusblib? Why to use nxpusblib? Summary 2

NXP USB Portfolio

NXP MCU the only complete ARM range of Cortex-M0, Cortex-M3 and Cortex-M4 processors cost performance 8-bit 16-bit 32-bit DSP Entry level Cortex-M0 NXP ARM Cortex-M Continuum Cortex-M0 Cortex-M3 Cortex-M4 Fully featured Cortex-M4 True 8/16-bit replacement - low power, low cost, more performance High performance for communication and control - USB, Ethernet, CAN, and much more Advanced Digital Signal control - Floating point unit - Dual-core options Over 250 different ARM based microcontrollers available!! 4

USB Roadmap for Cortex-M0 Full-Speed LPC134x LPC11U1x LPC11U2x 32K Flash, 6K SRAM LPC11Uxx 32K Flash, up to 10K SRAM, up to 4K EEPROM LQFP64 package offering 40-128K Flash, up to 10K SRAM, up to 4K EEPROM Small sector size (256 bytes) LQFP64 package offering Up to 64K Flash, up to 10K SRAM, up to 4K EEPROM Small sector size (256 bytes) LQFP64 package offering Low cost USB Platform for mbed Platform for LPCXpreso 5

USB Roadmap for Cortex-M3/M4 High Speed LPC4300 LPC1800 6

LPC11U00- Entry level USB Up to 32k Flash Power Profiles Up to 40 GPIOs Also TFBGA48 (4.5 x 4.5 mm) 2 SSP USB 2.0 FS Smart Card Interface 7

LPC1800 HS Demo Out-of-the-Box Experience

What is nxpusblib?

Setting up nxpusb with just 3 APIs! Setup using just 3 APIs: USB_Init () USB_Connect () Event_functions() Events. ROM drivers- HID, MSC, CDC, custom 10

On-Chip USB Rom Drivers Customer benefits: Savings of up to 4K code space API driven approach Programming via USB using Mass Storage Class Ease of use as a Virtual COM port Custom class benefits 11

nxpusblib + on-chip ROM Drivers Same API application interface with or without on-chip ROM drivers 12

USB controller Support Device Host Dual-Host Coming Soon! 13

Class Support HID VCOM Device Firmware Update (DFU*) MSC Audio Smart Card* *DFU, Smart Card Interface coming soon! 14

What is included in nxpusblib? Supported controllers Full speed, device mode controller (dedicated buffers) Full speed, host and device mode controller (shared buffers) High speed, host and device mode controller Supported transfer types Control Bulk Interrupt Isochronous Supported tool chains Keil uvision 4 LPCXpresso 4 Supported boards LPCXpresso LPC11U14, LPC1769 and Rev B base board Hitex LPC1850/4350 Evaluation Board (rev A4) NGX LPC4330-Xplorer Element 14 LPC4350 gaming board Embedded Artists Included examples Audio output host and device Keyboard host and device Mass storage host and device Mouse device VCOM device ROM drivers HS: LPC1800, LPC4300 FS: LPC11U00, LPC1300 15

Where to get nxpusblib? nxpusblib website: http://www.lpcware.com/content/project/nxpusblib Latest version of nxpusblib Links to development board vendors Links to compilers/debuggers and other tools Build and configuration documentation 16

What is available in the download? One zip file: Full source to a complete USB stack 10 example applications Android Accessory project from Embedded Artists Project files for uvision4 and LPCXpresso 4 Documentation 17

nxpusblib directory structure Keil workspace project file Example applications Board support packages Chip drivers USB library 18

Building nxpusblib with Keil uvision 4 Master workspace project file: \applications\examples\nxpusblib\nxpusblib_workspace.uvmpw Batch build feature Target selection 19

Building nxpusblib with LPCXpresso 1. Import all Existing Projects into the workspace 2. Set build configurations (right click->build config) 3. Click Build 20

Configuring nxpusblib (With ROM Drivers) \libraries\nxpusblib\nxpusblibconfig.h /* This option effects only on high speed parts that need to test full speed activities */ #define USB_FORCED_FULLSPEED 0 /* Define USE_USB_ROM_STACK = 1 to use MCU's internal ROM stack, 0 if otherwise */ #define USE_USB_ROM_STACK 0 21

How to use nxpusblib? Creating a HID project in 5 Steps!

nxpusblib Board Support Package (BSP) 23

Using nxpusblib for your application Objectives: We would like to send one byte to the USB hardware to turn on/off an LED using P0.7, and we also need to read the state of a button (P0.1). The hardware will be an LPC11U14 LPCXpresso board plugged into an NGX base board. 24

Step 1: Selecting projects in LPCXpresso When we read nxpusblib into the LPCXpresso IDE, we are presented with the entire library, so we need to choose which we will need for our project. The CDL and nxpusblib are required for all projects. Example_GenericHIDDevice will also be used in this demonstration. Click on the Finish button. 25

Step 2: Configuring projects in LPCXpresso Make sure you choose the appropriate Configuration for the project you are using. 26

Step 3: Enabling the Indexer Under Windows -> Preferences, the Indexer should set the Build configuration to Use active build configuration 27

Step 4: Select the microcontroller For each project listed in the Project Explorer, change to the appropriate microcontroller 28

Step 5: (Optional) if not using BSP Since we are creating our own project (not using the BSP included in nxpusblib) we can remove the references to the BSP in the Example_GenericHIDDevice project. Includes and Libraries GenericHID.h 29

Step 6: Customizing the Generic HID example Now that we have the IDE environment set up for creating our HID project, we need to make a few modifications. The default Report Size, as defined in the Descriptors.h file is 8 bytes. We are only going to use one byte, so this can be changed to 1. /** Size in bytes of the Generic HID reports. */ #define GENERIC_REPORT_SIZE 1 In most situations, you will probably want to change the Product ID, and sometimes the Vendor ID. These values can be found in the Descriptors.c file..vendorid = 0x1FC9, /* NXP */.ProductID = 0x204F, 30

Step 8: Customizing the Generic HID example In the GenericHID.c file: 1. All references to the LEDs_SetAllLEDs function can be commented out since these are part of the BSP.c file 2. The bsp_init(), LEDs_Init(), sei() and USB_Connect() can be commented out. 3. We need to add the following to the main(void) to initialize P0.7 to be an output to drive the LED: LPC_GPIO->DIR[0] = (1<<7); 31

Step 9: Customizing the Generic HID example The two callback functions are used to send/receive data from the USB host. These two functions are found in the GenericHID.c file void CALLBACK_HID_Device_ProcessHIDReport( ) { uint8_t* Data = (uint8_t*)reportdata; if (Data[0] & 0x01) LPC_GPIO->SET[0] = (1<<7); // set P0.7 high else LPC_GPIO->CLR[0] = (1<<7); // set P0.7 low *ReportSize = GENERIC_REPORT_SIZE; return false; } CALLBACK_HID_Device_CreateHIDReport( ) { uint8_t* Data = (uint8_t*)reportdata; if (LPC_GPIO->PIN[0] & 0x02) Data[0] = 1; // return 1 if not pressed else Data[0] = 0; // return 0 if not pressed } 32

Step 10: Testing nxpusblib Use a generic HID application to send and receive data from the LPC11U14 33

Why to use nxpusblib?

Comparison with USB stacks Significant savings (~50%) using nxpusblib + on-chip ROM Limitations with USBHostLite: Supports one class only (Mass storage) 35

Best-in-Class Support from NXP team! We want to hear from you! LPCForums USB http://www.lpcware.com/forums/peripherals-forums/usb 36

Summary

Summary 38

One Stop Shop for USB! Widest range of USB controllers FS, HS Device, host and Dual host controllers Certified at USB.org! FREE USB stacks nxpusblib + other stacks On-chip ROM drivers HID, MSC, CDC, Custom class FREE PID program Launching soon! 39

Where to get started? www.nxp.com/microcontrollers MCU homepage www.nxp.com/lpczone Product updates and training www.nxp.com/lpcxpresso Low-cost development www.lpcware.com Download nxpusblib! 40