logging in or signing up ftdi vnc2 introduction kulrajpurewal Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 801 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: August 17, 2010 This Presentation is Public Favorites: 0 Presentation Description Technical presentation detailing features of the FTDI VNC2 USB Host / Slave controller IC. Comments Posting comment... Premium member Presentation Transcript Slide 1: Vinculum II (VNC2) Product Training Kulraj Purewal Product Marketing Engineer Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary VNC2: Introduction : VNC2: Introduction VNC2 is the 2nd generation of Vinculum USB controllers. VNC2 is a programmable, dual channel USB Host / Slave controller with embedded microprocessor core. Designed to deliver powerful USB connectivity and processing capability for embedded applications. Enhanced features and capabilities over VNC1L: Upgraded CPU offering increased the processing power. Programmability, supports user customised firmware. Hardware acceleration of USB processing. Multiple interfaces Supported with Vinculum II software development tools and resources to enable faster time to market, as well as provide a low-risk easy to adopt solution. VNC2: Architecture : Two independent USB Host / Slave interfaces. 16-bit, 48MHz Harvard architecture MCU core. 256KBytes Flash Memory for firmware storage. 16KBytes RAM. Interrupt and timer interfaces VNC2: Architecture VNC2: Architecture : Interfaces: UART SPI Slave SPI Master FIFO mode 8 PWM blocks GPIO Debug Interface 4 DMA engines for managing I/O transfers VNC2: Architecture VNC2: USB Support : VNC2: USB Support VNC2 has two independent USB 2.0 compliant Host / Slave interfaces Supports 1.5Mb/s (Low Speed) and 12Mb/s (Full Speed) transactions. Supports 4 main USB data transfer types. Interrupt transfers: Bulk: Isochronous: Control USB Host capability Modelled on OHCI Host controller specification. Provides capability comparable to USB Host controller found on a PC. Very powerful, hardware based autonomous host engine, which uses minimal CPU resources. Timely, reliable transfers, eg keyboard and mouse. Large blocks of data less time critical eg Printers, FT232R. Defined bandwidth & latency eg. Webcams. Used for device configuration and enumeration. CPU Resource : CPU Resource A large percentage of VNC1 software functions have been moved into VNC2 hardware, releasing CPU resources. CPU : CPU Vinculum II has expanded the Vinculum I CPU to provide a cost effective, USB optimised CPU: VNC1 – 8 bit Harvard architecture VNC2 16 bit Harvard architecture Operating frequency – 48MHz, 24MHz, 12MHz. Variable length instruction word – instructions can be 16 bit to 64 bits in size 8, 16, 32 signed/unsigned support Byte addressable External Interfaces : External Interfaces UART Standard UART connections supporting 183baud to 6Mbaud. GPIO Up to 44 general purpose that can be configured as inputs or outputs. Inputs can be used to trigger interrupts. FIFO Fast 8-bit FIFO interface supporting asynchronous (10MByte/s) and synchronous (48MByte/s) communication modes. PWM (Pulse Width Modulation) Designed for controlling external analogue devices. 8 PWM outputs with 8 bit pre-scaler and 16 bit timer. 16 bit comparator per output to support 8 toggles per PWM cycle. SPI Interfaces : SPI Interfaces SPI - Popular 4 wire serial interface VNC2 supports two SPI Slave ports and one SPI Master port. SPI master interfaces designed to for SD card interfacing, amongst other applications. SPI master supports up to slave select outputs. SPI max clock rate derived at ¼ of CPU clock frequency. Normal mode, CPU 48MHz, SPI max clock is 12MHz Lowest power mode CPU 12MHz, SPI max clock is 3MHz. SPI slave supports various supported operating modes including clock phase and polarity control modes. Slide 11: The SPI slave protocol by default does not support any form of handshaking. FTDI have added extra modes to support handshaking, faster throughput of data and reduced pin count. These modes are as follows: SPI Slave Debug Interface : Debug Interface Designed to support firmware debug via software tools. Modelled one bit bi-directional pin, using UART 1Mbaud, 8 bit, 1 start, 1 stop, no parity protocol. Debugger is a master on all internal buses and can therefore configure peripherals, change memory, write to the flash, etc. Accesses CPU’s breakpoint unit (effectively a peripheral) to set breakpoints, halt, step, etc. Requires hardware support to translate debug pin to USB. Use FTDI VNC2 debug module. Implement USB to debug interface circuit on customer hardware. Debug Interface : Debug Interface Debug module circuit based on FT232R to translate debug pin to a USB I/F for software tool access Users can implement entire circuit or implement header for VNC2 debug module Debug header IO Multiplexer : IO Multiplexer Internal IO multiplexer (IOMux). Designed to provide a flexible mechanism for connecting signals to device pins. A device signal, eg UART_TXD, is allocated to one of four groups. Signal can be connected to any IOBUS device pin in the group. Each IOBUS pin can also be pulled up/down, have extra drive strength and can be a schmitt trigger. Asserting device PROG# and RESET# pins will cause IOMux pins to return to default settings. VNC2: Power Operation : VNC2: Power Operation Low power operation. 4 Power modes. Fourth mode is a suspend mode, consuming ~150uA. Device can be woken from suspend when activity is detected on: USB0/1 DP or DM SPI slave 0/1 SSn uart_ri VNC2: Packages : VNC2: Packages LQFP and QFN have same pin assignments. The groupings are used by the IO_MUX to define the actual pin functionality. 2 USB ports, power and ground are available on all packages VNC2 to VNC1L Summary : VNC2 to VNC1L Summary USB processing moved to hardware, freeing up CPU cycles 48-pin LQFP backwards compatible with VNC1L Target Applications : VNC2 is targeted to provide powerful USB connectivity with processing capabilities for an embedded application. Wide range of applications. Adding USB Host capability to an embedded product. Connect a USB Flash drive to MCU/PLD/FPGA – data storage and firmware updates. USB Flash drive / SD card interfaces. VNC2 approach offers significant advantages over using a device with integrated USB. USB interfaces are commonly software based implementations which are lower performance. Customers need to develop and maintain USB drivers. Target Applications VNC2: Typical Applications : Consumer Electronics USB Flash drive data storage or firmware updates. Digital camera to USB Flash drive or similar USB client device interface. MP3 Player to USB Flash drive or other USB client device interface. Provide connectivity to iPOD / iPhone style devices. TV, PVR, Set Top Box – USB Flash drive. USB webcam interfacing Flash drive to SD Card data transfer. Health monitors – Sports watches, training aids. VNC2: Typical Applications VNC2: Typical Applications : Communications Wireless Interfaces – 3G / Bluetooth. USB wireless process controller. Telecom system calls logging to replace printer log. Mobile phone to USB Flash drive. GPS to mobile phone interface. GPS tracker with USB Flash disk storage. Geo-tagging of photos – GPS location linked to image. Industrial & Medical Instrumentation USB Flash drive. Smart meters. Data-logger USB Flash drive. Scanners and cameras. …… more VNC2: Typical Applications VNC2 Development Modules : VNC2 Development Modules V2-EVAL Complete evaluation and prototyping kit. 2 x USB type ‘A’ connectors, headers for access to interfaces, external power supply and prototyping area. VNC2 accessed via daughterboard site. V2DIP1/V2DIP2 Modules Compact, easy-to-integrate modules 0.1” pitch headers provide access to VNC2 device interfaces. VNC2 Debug Module Designed for loading and debugging firmware on VNC2 Device Schedule : Device Schedule VNC2 Rev A devices samples available now. Evaluation boards stock: V2_EVAL board with various daughter boards. V2DIP1 / V2DIP2 modules. VNC2 Debug module. VNC2 Rev B devices available in September. Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary Firmware Overview : Firmware Overview New programmable approach for Vinculum opens up new potential uses and applications for VNC2. A new firmware development model is required to support application development on VNC2. Modular approach. Firmware architecture split into 4 categories: VNC2 real-time operating system (RTOS) VNC2 device drivers. Vinculum II Tool Chain – for user application development. Precompiled Firmware (same as VNC1L). Traditional embedded systems design approach. Slide 25: FTDI Supplied Content Stdlib Math Stdio User Application Device Manager File System Vinculum II Tool Suite SD Card SPI Master SPI Slave UART FIFO USB Host BOMS HID HUB CDC FT232 USB Slave Kernel Services Vinculum II Hardware Libraries Upper Level Drivers Hardware Interface Drivers VNC2:Firmware Architecture VNC2 Firmware : VNC2 Firmware VNC2 RTOS Multithreaded RTOS. Responsible for scheduling, thread management, interrupt handling, application monitoring, hardware management and diagnostics. Device Manager Service to manage communications between RTOS kernel and device drivers. All communication to hardware is carried out via device drivers. Abstracts hardware interface from the user, simplifying development. User does not need to be a USB expert. Application Development ‘C’ based embedded development tools. Software Development Tool Chain : Software Development Tool Chain Vinculum II Chip VinIDE Firmware & Libraries Tool chain Integrated Development Environment : Integrated Development Environment Provides the environment to develop Vinculum II-based applications Easy-to-use GUI based environment, incorporates ability to edit, build and debug projects. Command line tools available. Integrates RTOS and drivers. Has many of the features of commercial IDEs used in the industry today VinIDE Tutorial : VinIDE Tutorial Video tutorial on Vinculum II Tool suite at following link: Software Development Flow : Typical development flow: Software Development Flow IDE *.asm file *.obj file *.bin/*.rom file COMPILER Assembler Linker Debugger V2CL Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary Application Programming on VNC2 : Application Programming on VNC2 1. Initialisation section Kernel initialisation Driver initialisation I/O configuration Thread creation Start scheduler 2. Thread execution section Driver management I/O transfers Processing VNC2 applications are made up of two parts: Initialisation : Initialisation Start Execution Setup I/O Configuration Declare Threads Start Scheduler / RTOS Start Setup clock freq, scheduler freq, no of devices. Declare drivers to be used eg UART/USB/BOMs drivers. Setup IOMUX routing Declare user processing threads Thread Execution : Thread Execution Return/ Loop Open Driver Handles Thread called Carry out user processing Scheduler will periodically monitor execution and task priority. If higher priority process appears, scheduler will stall current task and switch execution By storing the scheduler will store details on current task. Program Example : Program Example void main(void) { usbhost_context_t usb_ctx; gpio_context_t gpioCtx; // Initialise kernel vos_init(10, VOS_TICK_INTERVAL, NUMBER_OF_DEVICES); vos_set_clock_frequency(VOS_48MHZ_CLOCK_FREQUENCY); // Initialise IOMUX parameters vos_iomux_define_output(12,IOMUX_OUT_GPIO_PORT_A_1); vos_iomux_define_output(13,IOMUX_OUT_GPIO_PORT_A_2); vos_iomux_define_output(29,IOMUX_OUT_GPIO_PORT_A_5); vos_iomux_define_output(31,IOMUX_OUT_GPIO_PORT_A_6); //Initialise drivers // use a max of 4 USB devices usb_ctx.if_count = 4; usbhost_init(-1, VOS_DEV_USB_HOST, &usb_ctx); boms_init(VOS_DEV_BOMS); fatdrv_init(VOS_DEV_FAT); gpioCtx.port_identifier = GPIO_PORT_A; gpio_init(VOS_DEV_GPIO,&gpioCtx); // Declare thread called tcbFirmware in function firmware() tcbFirmware = vos_create_thread(29, SIZEOF_FIRMWARE_TASK_MEMORY, firmware, 0); //Start RTOS and start execution of threads vos_start_scheduler(); main_loop: goto main_loop; } void firmware(void) { unsigned char connectstate; unsigned char status; usbhost_device_handle *ifDev; // USB host variables usbhost_ioctl_cb_t hc_iocb; usbhost_ioctl_cb_class_t hc_iocb_class; msi_ioctl_cb_t boms_iocb; // BOMS device variables boms_ioctl_cb_attach_t boms_att; fat_ioctl_cb_t fat_ioctl; // FAT file system variables fatdrv_ioctl_cb_attach_t fat_att; FILE *file; gpio_ioctl_cb_t gpio_iocb; // GPIO variables unsigned char leds; // open host controller handle hUsb = vos_dev_open(VOS_DEV_USB_HOST); // open GPIO device handle hGpio = vos_dev_open(VOS_DEV_GPIO); gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; gpio_iocb.value = 0xff; // set all as output vos_dev_ioctl(hGpio, &gpio_iocb); do { //Main processing code occurs in a loop vos_delay_msecs(250); leds = LED0; vos_dev_write(hGpio,&leds,1,NULL); vos_delay_msecs(250); leds = 0; vos_dev_write(hGpio,&leds,1,NULL); ………… Initialisation Code Thread Processing Code Pre-compiled Firmware : Pre-compiled Firmware Range of VNC1L style firmware images will be released for VNC2. V2DAP: Disk and peripherals. Available V2DPS: Disk, printer and slave interface support. Available V2MUSIC: planned Firmware will be supplied as a full source project as an application example. Large range of examples available with installer. GPS Logger Digital camera capture USB Host USB Slave Multithread processing example HID class examples Plugins – IOMux Utility : Plugins – IOMux Utility Software utility for setting device IOMux configuration. Graphical interface provides easy configuration. Utility generates IOMux code for user software program. Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary VNC2 Application Examples : VNC2 Application Examples VMUSIC - VNC1L based design. MCU can reads music files from flash disk via VNC1L MCU controls playback via VNC1L via SPI interface. Support via VMSC firmware VNC2 Application Examples : VNC2 Application Examples VMUSIC – VNC2 Upgraded Design. VNC2 replaces VNC1L and MCU to provide music playback and control New interfaces add extra capability, eg OLED display. VNC2 replaces VNC1L and MCU. VNC2 Application Examples : VNC2 Application Examples GPS Module Design. VNC2 connects to GPS receiver. GPS data can be sent to USB Flash disk or to a PC for analysis using Map software. Other USB connection can be used for communications connectivity. GPS Logging featured in Vinculum Software Examples Technical Collateral : Technical Collateral VNC2 Chip Datasheet. Errata. AN_118 Migration Guide. TN_108 VNC Chipset Comparison. VNC2 evaluation modules V2-EVAL datasheet. V2DIP1-32, V2DIP1-48, V2DIP1-64 datasheets. V2DIP2-32, V2DIP2-48, V2DIP2-64 datasheets. VNC2 Debug Module datasheet. Vinculum II Toolchain version 1.2.0 available for download AN_137 IO Cell Description. AN_138 Debug Interface Description. AN_139 IOMUX Explained. AN_140 PWM Example. Summary : VNC2 is the second generation of FTDI’s Vinculum family of dual USB Host Controllers VNC2 provides a new cost effective solution for providing USB interfacing and processing capability for embedded applications. Range of flexible connectivity interfaces for interconnecting to external systems. Extensive set of Tools, Firmware and Libraries (all FOC) providing ready-to-use USB connectivity for a range of applications. Complete USB solution. Summary Summary : VNC2 is available in 32/48/64-pin Pb-free (RoHS compliant) LQFP and QFN packages. VNC2 silicon samples and evaluation boards available now Large number of firmware samples and application notes available on FTDI website. Summary Slide 45: 45 Thank You You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
ftdi vnc2 introduction kulrajpurewal Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 801 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: August 17, 2010 This Presentation is Public Favorites: 0 Presentation Description Technical presentation detailing features of the FTDI VNC2 USB Host / Slave controller IC. Comments Posting comment... Premium member Presentation Transcript Slide 1: Vinculum II (VNC2) Product Training Kulraj Purewal Product Marketing Engineer Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary VNC2: Introduction : VNC2: Introduction VNC2 is the 2nd generation of Vinculum USB controllers. VNC2 is a programmable, dual channel USB Host / Slave controller with embedded microprocessor core. Designed to deliver powerful USB connectivity and processing capability for embedded applications. Enhanced features and capabilities over VNC1L: Upgraded CPU offering increased the processing power. Programmability, supports user customised firmware. Hardware acceleration of USB processing. Multiple interfaces Supported with Vinculum II software development tools and resources to enable faster time to market, as well as provide a low-risk easy to adopt solution. VNC2: Architecture : Two independent USB Host / Slave interfaces. 16-bit, 48MHz Harvard architecture MCU core. 256KBytes Flash Memory for firmware storage. 16KBytes RAM. Interrupt and timer interfaces VNC2: Architecture VNC2: Architecture : Interfaces: UART SPI Slave SPI Master FIFO mode 8 PWM blocks GPIO Debug Interface 4 DMA engines for managing I/O transfers VNC2: Architecture VNC2: USB Support : VNC2: USB Support VNC2 has two independent USB 2.0 compliant Host / Slave interfaces Supports 1.5Mb/s (Low Speed) and 12Mb/s (Full Speed) transactions. Supports 4 main USB data transfer types. Interrupt transfers: Bulk: Isochronous: Control USB Host capability Modelled on OHCI Host controller specification. Provides capability comparable to USB Host controller found on a PC. Very powerful, hardware based autonomous host engine, which uses minimal CPU resources. Timely, reliable transfers, eg keyboard and mouse. Large blocks of data less time critical eg Printers, FT232R. Defined bandwidth & latency eg. Webcams. Used for device configuration and enumeration. CPU Resource : CPU Resource A large percentage of VNC1 software functions have been moved into VNC2 hardware, releasing CPU resources. CPU : CPU Vinculum II has expanded the Vinculum I CPU to provide a cost effective, USB optimised CPU: VNC1 – 8 bit Harvard architecture VNC2 16 bit Harvard architecture Operating frequency – 48MHz, 24MHz, 12MHz. Variable length instruction word – instructions can be 16 bit to 64 bits in size 8, 16, 32 signed/unsigned support Byte addressable External Interfaces : External Interfaces UART Standard UART connections supporting 183baud to 6Mbaud. GPIO Up to 44 general purpose that can be configured as inputs or outputs. Inputs can be used to trigger interrupts. FIFO Fast 8-bit FIFO interface supporting asynchronous (10MByte/s) and synchronous (48MByte/s) communication modes. PWM (Pulse Width Modulation) Designed for controlling external analogue devices. 8 PWM outputs with 8 bit pre-scaler and 16 bit timer. 16 bit comparator per output to support 8 toggles per PWM cycle. SPI Interfaces : SPI Interfaces SPI - Popular 4 wire serial interface VNC2 supports two SPI Slave ports and one SPI Master port. SPI master interfaces designed to for SD card interfacing, amongst other applications. SPI master supports up to slave select outputs. SPI max clock rate derived at ¼ of CPU clock frequency. Normal mode, CPU 48MHz, SPI max clock is 12MHz Lowest power mode CPU 12MHz, SPI max clock is 3MHz. SPI slave supports various supported operating modes including clock phase and polarity control modes. Slide 11: The SPI slave protocol by default does not support any form of handshaking. FTDI have added extra modes to support handshaking, faster throughput of data and reduced pin count. These modes are as follows: SPI Slave Debug Interface : Debug Interface Designed to support firmware debug via software tools. Modelled one bit bi-directional pin, using UART 1Mbaud, 8 bit, 1 start, 1 stop, no parity protocol. Debugger is a master on all internal buses and can therefore configure peripherals, change memory, write to the flash, etc. Accesses CPU’s breakpoint unit (effectively a peripheral) to set breakpoints, halt, step, etc. Requires hardware support to translate debug pin to USB. Use FTDI VNC2 debug module. Implement USB to debug interface circuit on customer hardware. Debug Interface : Debug Interface Debug module circuit based on FT232R to translate debug pin to a USB I/F for software tool access Users can implement entire circuit or implement header for VNC2 debug module Debug header IO Multiplexer : IO Multiplexer Internal IO multiplexer (IOMux). Designed to provide a flexible mechanism for connecting signals to device pins. A device signal, eg UART_TXD, is allocated to one of four groups. Signal can be connected to any IOBUS device pin in the group. Each IOBUS pin can also be pulled up/down, have extra drive strength and can be a schmitt trigger. Asserting device PROG# and RESET# pins will cause IOMux pins to return to default settings. VNC2: Power Operation : VNC2: Power Operation Low power operation. 4 Power modes. Fourth mode is a suspend mode, consuming ~150uA. Device can be woken from suspend when activity is detected on: USB0/1 DP or DM SPI slave 0/1 SSn uart_ri VNC2: Packages : VNC2: Packages LQFP and QFN have same pin assignments. The groupings are used by the IO_MUX to define the actual pin functionality. 2 USB ports, power and ground are available on all packages VNC2 to VNC1L Summary : VNC2 to VNC1L Summary USB processing moved to hardware, freeing up CPU cycles 48-pin LQFP backwards compatible with VNC1L Target Applications : VNC2 is targeted to provide powerful USB connectivity with processing capabilities for an embedded application. Wide range of applications. Adding USB Host capability to an embedded product. Connect a USB Flash drive to MCU/PLD/FPGA – data storage and firmware updates. USB Flash drive / SD card interfaces. VNC2 approach offers significant advantages over using a device with integrated USB. USB interfaces are commonly software based implementations which are lower performance. Customers need to develop and maintain USB drivers. Target Applications VNC2: Typical Applications : Consumer Electronics USB Flash drive data storage or firmware updates. Digital camera to USB Flash drive or similar USB client device interface. MP3 Player to USB Flash drive or other USB client device interface. Provide connectivity to iPOD / iPhone style devices. TV, PVR, Set Top Box – USB Flash drive. USB webcam interfacing Flash drive to SD Card data transfer. Health monitors – Sports watches, training aids. VNC2: Typical Applications VNC2: Typical Applications : Communications Wireless Interfaces – 3G / Bluetooth. USB wireless process controller. Telecom system calls logging to replace printer log. Mobile phone to USB Flash drive. GPS to mobile phone interface. GPS tracker with USB Flash disk storage. Geo-tagging of photos – GPS location linked to image. Industrial & Medical Instrumentation USB Flash drive. Smart meters. Data-logger USB Flash drive. Scanners and cameras. …… more VNC2: Typical Applications VNC2 Development Modules : VNC2 Development Modules V2-EVAL Complete evaluation and prototyping kit. 2 x USB type ‘A’ connectors, headers for access to interfaces, external power supply and prototyping area. VNC2 accessed via daughterboard site. V2DIP1/V2DIP2 Modules Compact, easy-to-integrate modules 0.1” pitch headers provide access to VNC2 device interfaces. VNC2 Debug Module Designed for loading and debugging firmware on VNC2 Device Schedule : Device Schedule VNC2 Rev A devices samples available now. Evaluation boards stock: V2_EVAL board with various daughter boards. V2DIP1 / V2DIP2 modules. VNC2 Debug module. VNC2 Rev B devices available in September. Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary Firmware Overview : Firmware Overview New programmable approach for Vinculum opens up new potential uses and applications for VNC2. A new firmware development model is required to support application development on VNC2. Modular approach. Firmware architecture split into 4 categories: VNC2 real-time operating system (RTOS) VNC2 device drivers. Vinculum II Tool Chain – for user application development. Precompiled Firmware (same as VNC1L). Traditional embedded systems design approach. Slide 25: FTDI Supplied Content Stdlib Math Stdio User Application Device Manager File System Vinculum II Tool Suite SD Card SPI Master SPI Slave UART FIFO USB Host BOMS HID HUB CDC FT232 USB Slave Kernel Services Vinculum II Hardware Libraries Upper Level Drivers Hardware Interface Drivers VNC2:Firmware Architecture VNC2 Firmware : VNC2 Firmware VNC2 RTOS Multithreaded RTOS. Responsible for scheduling, thread management, interrupt handling, application monitoring, hardware management and diagnostics. Device Manager Service to manage communications between RTOS kernel and device drivers. All communication to hardware is carried out via device drivers. Abstracts hardware interface from the user, simplifying development. User does not need to be a USB expert. Application Development ‘C’ based embedded development tools. Software Development Tool Chain : Software Development Tool Chain Vinculum II Chip VinIDE Firmware & Libraries Tool chain Integrated Development Environment : Integrated Development Environment Provides the environment to develop Vinculum II-based applications Easy-to-use GUI based environment, incorporates ability to edit, build and debug projects. Command line tools available. Integrates RTOS and drivers. Has many of the features of commercial IDEs used in the industry today VinIDE Tutorial : VinIDE Tutorial Video tutorial on Vinculum II Tool suite at following link: Software Development Flow : Typical development flow: Software Development Flow IDE *.asm file *.obj file *.bin/*.rom file COMPILER Assembler Linker Debugger V2CL Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary Application Programming on VNC2 : Application Programming on VNC2 1. Initialisation section Kernel initialisation Driver initialisation I/O configuration Thread creation Start scheduler 2. Thread execution section Driver management I/O transfers Processing VNC2 applications are made up of two parts: Initialisation : Initialisation Start Execution Setup I/O Configuration Declare Threads Start Scheduler / RTOS Start Setup clock freq, scheduler freq, no of devices. Declare drivers to be used eg UART/USB/BOMs drivers. Setup IOMUX routing Declare user processing threads Thread Execution : Thread Execution Return/ Loop Open Driver Handles Thread called Carry out user processing Scheduler will periodically monitor execution and task priority. If higher priority process appears, scheduler will stall current task and switch execution By storing the scheduler will store details on current task. Program Example : Program Example void main(void) { usbhost_context_t usb_ctx; gpio_context_t gpioCtx; // Initialise kernel vos_init(10, VOS_TICK_INTERVAL, NUMBER_OF_DEVICES); vos_set_clock_frequency(VOS_48MHZ_CLOCK_FREQUENCY); // Initialise IOMUX parameters vos_iomux_define_output(12,IOMUX_OUT_GPIO_PORT_A_1); vos_iomux_define_output(13,IOMUX_OUT_GPIO_PORT_A_2); vos_iomux_define_output(29,IOMUX_OUT_GPIO_PORT_A_5); vos_iomux_define_output(31,IOMUX_OUT_GPIO_PORT_A_6); //Initialise drivers // use a max of 4 USB devices usb_ctx.if_count = 4; usbhost_init(-1, VOS_DEV_USB_HOST, &usb_ctx); boms_init(VOS_DEV_BOMS); fatdrv_init(VOS_DEV_FAT); gpioCtx.port_identifier = GPIO_PORT_A; gpio_init(VOS_DEV_GPIO,&gpioCtx); // Declare thread called tcbFirmware in function firmware() tcbFirmware = vos_create_thread(29, SIZEOF_FIRMWARE_TASK_MEMORY, firmware, 0); //Start RTOS and start execution of threads vos_start_scheduler(); main_loop: goto main_loop; } void firmware(void) { unsigned char connectstate; unsigned char status; usbhost_device_handle *ifDev; // USB host variables usbhost_ioctl_cb_t hc_iocb; usbhost_ioctl_cb_class_t hc_iocb_class; msi_ioctl_cb_t boms_iocb; // BOMS device variables boms_ioctl_cb_attach_t boms_att; fat_ioctl_cb_t fat_ioctl; // FAT file system variables fatdrv_ioctl_cb_attach_t fat_att; FILE *file; gpio_ioctl_cb_t gpio_iocb; // GPIO variables unsigned char leds; // open host controller handle hUsb = vos_dev_open(VOS_DEV_USB_HOST); // open GPIO device handle hGpio = vos_dev_open(VOS_DEV_GPIO); gpio_iocb.ioctl_code = VOS_IOCTL_GPIO_SET_MASK; gpio_iocb.value = 0xff; // set all as output vos_dev_ioctl(hGpio, &gpio_iocb); do { //Main processing code occurs in a loop vos_delay_msecs(250); leds = LED0; vos_dev_write(hGpio,&leds,1,NULL); vos_delay_msecs(250); leds = 0; vos_dev_write(hGpio,&leds,1,NULL); ………… Initialisation Code Thread Processing Code Pre-compiled Firmware : Pre-compiled Firmware Range of VNC1L style firmware images will be released for VNC2. V2DAP: Disk and peripherals. Available V2DPS: Disk, printer and slave interface support. Available V2MUSIC: planned Firmware will be supplied as a full source project as an application example. Large range of examples available with installer. GPS Logger Digital camera capture USB Host USB Slave Multithread processing example HID class examples Plugins – IOMux Utility : Plugins – IOMux Utility Software utility for setting device IOMux configuration. Graphical interface provides easy configuration. Utility generates IOMux code for user software program. Contents : Contents Vinculum II (VNC2) Chip VNC2 Programming Tools How to build an application on the VNC2 Application Examples Summary VNC2 Application Examples : VNC2 Application Examples VMUSIC - VNC1L based design. MCU can reads music files from flash disk via VNC1L MCU controls playback via VNC1L via SPI interface. Support via VMSC firmware VNC2 Application Examples : VNC2 Application Examples VMUSIC – VNC2 Upgraded Design. VNC2 replaces VNC1L and MCU to provide music playback and control New interfaces add extra capability, eg OLED display. VNC2 replaces VNC1L and MCU. VNC2 Application Examples : VNC2 Application Examples GPS Module Design. VNC2 connects to GPS receiver. GPS data can be sent to USB Flash disk or to a PC for analysis using Map software. Other USB connection can be used for communications connectivity. GPS Logging featured in Vinculum Software Examples Technical Collateral : Technical Collateral VNC2 Chip Datasheet. Errata. AN_118 Migration Guide. TN_108 VNC Chipset Comparison. VNC2 evaluation modules V2-EVAL datasheet. V2DIP1-32, V2DIP1-48, V2DIP1-64 datasheets. V2DIP2-32, V2DIP2-48, V2DIP2-64 datasheets. VNC2 Debug Module datasheet. Vinculum II Toolchain version 1.2.0 available for download AN_137 IO Cell Description. AN_138 Debug Interface Description. AN_139 IOMUX Explained. AN_140 PWM Example. Summary : VNC2 is the second generation of FTDI’s Vinculum family of dual USB Host Controllers VNC2 provides a new cost effective solution for providing USB interfacing and processing capability for embedded applications. Range of flexible connectivity interfaces for interconnecting to external systems. Extensive set of Tools, Firmware and Libraries (all FOC) providing ready-to-use USB connectivity for a range of applications. Complete USB solution. Summary Summary : VNC2 is available in 32/48/64-pin Pb-free (RoHS compliant) LQFP and QFN packages. VNC2 silicon samples and evaluation boards available now Large number of firmware samples and application notes available on FTDI website. Summary Slide 45: 45 Thank You