Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time Library TCPnet Networking Suite Flash File System USB and CAN Interfaces RTX Real-Time Kernel.

Similar presentations


Presentation on theme: "Real-Time Library TCPnet Networking Suite Flash File System USB and CAN Interfaces RTX Real-Time Kernel."— Presentation transcript:

1 Real-Time Library TCPnet Networking Suite Flash File System USB and CAN Interfaces RTX Real-Time Kernel

2 Presentation Agenda Overview and Introduction TCPnet Networking Suite
Embedded Connectivity Challenges Components of the Real-Time Library TCPnet Networking Suite Protocols, Applications and TCP/IP Components Networking examples Flash File System Structure and SD Memory Card example USB Device Interface Device Driver Classes and HID example CAN Interface CAN example RTX Real-Time Kernel RTOS Concepts and examples

3 Embedded Connectivity Challenges
Serial Interfaces Best choice, wide support, easy implementation CAN & USB Supported Multiple Devices, Multiple Interfaces Need support for numerous standards Need easy, high speed, PC style communication Multi-Point Access Different parts of system need device access Devices need to be system wide resource Web and Remote Communication Access to web-based resources Remote information transfer Internet

4 Today’s Microcontroller Selection
Wide range of MCU Cores 8/16/32 Bit On-chip Memory Interrupt System JTAG Debug and Embedded Trace Macrocell CAN Interface (2.0B) Dual Burst Flash 512KB Main 32KB 2nd level Power management, RTC, reset and watchdog, internal oscillator and PLL 80 GPIO Pins 96KB SRAM, optional battery back-up 16-bit standard Timers including PWM 10/100 Ethernet MAC with DMA and MII USB Full-speed Slave 9 Programmable DMA Channels 96MHz ARM966-EJS 3-Phase Induction Motor Controller (IMC) Three style UART’s Two fast I2C, 400KHz Two channels for SPI, SSI or Microwire 10-bit A/D converter (eight channels) Real-Time Clock Peripherals I/O Pins, Timers, PWM A/D and D/A converters UART, SPI, I2C Complex communication Peripherals (CAN, USB, Ethernet) Customers expect support for specific Microcontrollers. Block Diagram of STR9x

5 Today’s Microcontroller Selection
Wide range of MCU Cores 8/16/32 Bit On-chip Memory Interrupt System JTAG Debug and Embedded Trace Macrocell 2 CAN Channels 512KB On-chip Flash Power management, RTC, reset and watchdog, internal oscillator and PLL 104 GPIO Pins 32KB SRAM, 2KB Battery back-up RAM 16-bit standard Timers including PWM 10/100 Ethernet MAC with DMA & 16KB Static RAM USB 2.0 Interface with 8KB Static RAM 2 Programmable DMA Channels 72MHz ARM7TDMI-S SD/MMC Memory Card I/F 10-bit D/A converter Three I2C Interfaces Two channels for SPI or SSP 10-bit A/D converter (eight channels) Four style UART’s Peripherals I/O Pins, Timers, PWM A/D and D/A converters UART, SPI, I2C Complex communication peripherals (CAN, USB, Ethernet) Customers expect support for specific Microcontrollers. Block Diagram of LPC2378

6 RealView Real-Time Library
Extensive library of common ready-to-use middleware components, speed software development. RealView RTX Source Code TCP/IP Suite Flash File System USB Device Interface CAN Interface Examples and Templates Real-Time Library Meets Embedded Developers needs Solves common embedded challenges Real-Time systems Embedded communication & networking Designed for use with MCU devices Extensive Range of Examples Easy to begin working. Can be used as building blocks. Royalty Free Includes RTX source code. License – single user, multi project

7 TCP/IP Networking Suite
RL-TCPnet TCP/IP Networking Suite

8 TCPnet Networking Suite
Ground-up design for embedded applications, maximum performance, minimum memory requirement and easy to use. Socket Interface TCP/IP UDP Physical Interfaces Ethernet PPP (serial connection) SLIP (dial-up) Standard Applications HTTP Web Server with CGI Scripting Telnet and TFTP Server SMTP Client DNS Resolver Debugging Multiple debug levels: Errors only Complete status information Status information on UART interface

9 Flexible TCP/IP Communication Layer
TCPnet may be used with or without the RTX Kernel, fully integrated with µVision for easy configuration and debug

10 Scalable TCP/IP Connectivity
Direct PC connection Easily replaces point-point serial connection High Speed ~100Mbps Crossover Patch-Cable

11 Scalable TCP/IP Connectivity
Simple Network More flexible system Easily expanded LAN Ethernet Switch

12 Scalable TCP/IP Connectivity
Complex Network Multiple devices and interfaces Easy data sharing Flexible configuration LAN Ethernet Switch

13 Scalable TCP/IP Connectivity
Internet Connectivity TCPnet provides easy solution to connect to the world LAN Router Internet

14 Serial TCP/IP Connectivity
Classic Serial Modem Interface TCPnet provides serial interface support for PPP/SLIP Internet RS232 Telephone Line PPP/SLIP Modem

15 Flexible TCP/IP Connectivity
Cellular / Wireless Interface Extended to wireless world RS232 PPP/SLIP GPRS/GSM Internet RS232 Telephone Line PPP/SLIP Modem

16 Examples and Templates
RL-ARM Examples Examples and Templates

17 RTX & TCPnet Examples Example Projects show a complete configuration and help you to get started quickly. All examples are ready to run on Evaluation Boards. ..\Examples ..\Boards RTOS Kernel Examples Artx_ex1 Use basic RTOS kernel features: timeouts & signals Artx_ex2 Show task priorities and signal passing Mailbox Using the Mailbox and Memory Allocation functions Traffic Complete Traffic Light Controller with serial communication TCPnet Networking Examples (run on Atmel, NXP and ST Evaluation Boards) Http_demo HTTP Server with Password Protection and CGI Scripting Telnet_demo Telnet Server shows a simple IP based command line interface DNS_demo Using the DNS Resolver that connects to host names LEDSwitch Controlling with TCP/IP, UCP via Ethernet, SLIP or PPP Link SMTP_demo Shows sending of a dynamic message to an address 17

18 RTX & TCPnet Examples HTTP Server with CGI Interface
Server provides authentication and allows multiple sessions A CGI interface allows interaction with MCU hardware

19 TCPnet Examples LED Switch
LED’s can be controlled via PC or other eval board Uses TCP and UDP PC running LED Switch Client LAN LEDSwitch Utility (complete source code in \Keil\ARM\Utilities\LEDSwitch) Ethernet Switch Evaluation Boards with LED Switch Client

20 TCPnet Examples: Memory Footprint
HTTP Server: Web Server supporting dynamic Web pages and CGI Scripting Telnet Server: with command line interface, authorization etc TFTP Server: for uploading files (for example Web pages to a Web Server) SMTP Client: for sending automated s LED Switch Server and Client: shows basic TCP/IP and UDP communication DNS Resolver: used to resolve IP address from the Host name Demo Example Total ROM Size Total RAM Size HTTP Server (without RTX Kernel) 41,984 Bytes 20,112 Bytes HTTP Server (with RTX Kernel) 45,240 Bytes 21,776 Bytes Telnet Server 22,312 Bytes TFTP Server 34,996 Bytes 24,320 Bytes SMTP Client 16,736 Bytes 19,600 Bytes LED Switch Server 11,220 Bytes 19,568 Bytes LED Switch Client 15,328 Bytes 19,576 Bytes DNS Resolver 19,776 Bytes

21 RL-Flash Flash File System

22 Flash File System (RL-Flash)
RL-ARM includes a Flash File System that allows to create, save, read and modify files on ROM, RAM, classic Flash ROM, and Memory Cards Classic C File I/O Functions interface to RAM or ROM images Standard Flash ROM SD or MMC Memory Cards Configurable algorithm similar to ULINK2 Flash Programming Lightweight interface with small hardware requirements SD / MMC Memory Cards via proven SPI or MMC interface available in many ARM based Microcontrollers Format Function and Time Stamps (only interface to RTC needed) using FAT12 or FAT16 Flash File System (8.3 Filename conventions) Flash File System Flash Driver File Table FAT12/16 Flash ROM RAM SD/MMC Standard C File I/O Functions ROM

23 RL-Flash Examples SD Memory Card File I/O with SD Memory Card
Simple Command Interface Targets for UART or Real-Time Agent SD Card

24 RL-USB USB Device Interface

25 USB Device Interface (RL-USB)
RL-ARM includes Device Interfaces for common USB device classes which have default support in Windows 2000/XP/Vista (no driver hassle). Templates for standard ARM processor-based Microcontrollers Proven Hardware Layer USB Event Handler (HW specific) Generic USB Core Common USB Device Classes (HID, MSD, Audio) RTX Messages Interface enough power for other user tasks Common USB Device Classes Human Interface Device (HID): Mouse, Keyboard, Control Device Audio Device: Speaker, Microphone, Audio CD Mass Storage Device (MSD): USB Stick, Camera, (any external files) Communication Device: USB-COM Adapter, Telephone Modem (due Q4 2007)

26 USB Core Configuration using the µVision Configuration Wizard
RL-USB Configuration Implementing USB Devices requires USB know-how even when RL-ARM simplifies the configuration of the main USB parameters. Use a standard USB Template Adjust USB Core Parameters Update the Device Descriptors Extend the USB Event Handlers Composite Devices USB Core Configuration Specify USB Event Handlers Add USB Classes Configure the Device Descriptor Implement USB Class Code Add USB Class Code from the related USB Template Re-assign USB Event Handlers USB Core Configuration using the µVision Configuration Wizard

27 RL-USB Templates HID Template Other USB Templates
HID Template Connects to PC without driver LED’s can be controlled from PC application Switches are reported to the PC application LEDSwitch Utility (complete source code in \Keil\ARM\Utilities\USB_Client1) USB HID Other USB Templates Audio: implements a PC Speaker MSD: implements a Memory Stick

28 RL-CAN CAN Interface

29 RL-CAN Example Using Keil MCB2300 or MCBSTR9 Evaluation Board
A/D Converter gets input voltage from Potentiometer Input Voltage send every second (via CAN2) Message received via CAN is displayed on LED’s (via CAN1) Using µVision Simulation Script generates A/D input voltage Messages received via CAN2 Analog Input Voltage CAN Tx Incremental Script CAN Rec LED’s

30 Virtual Simulation Registers (VTREG)
µVision provides VTREGs for controlling of serial communication (CAN, I2C, SSP, SPI). CAN I/O is simulated using the following VTREGs.

31 µVision Debug & Signal Functions
Users define and generate complex input functions as stimulus to simulation models. Simulates Complex Input Scripts for CAN Input and Output Messages Signal Functions Automated Message Processing Periodic CAN Messages FUNC void SendCANmessage (void) { CAN0ID = 0x4500;// message ID = 0x CAN0L = 2; // message length 2 bytes CAN0B0 = 0x12; // message data byte 0 CAN0B1 = 0x34; // message data byte 1 CAN0IN = 2; // send message with 29-bit ID } FUNC void Print_CANmessage (void) { switch (CAN0OUT) { case 1: printf("\nSend 11-bit ID=%X", CANAID); break; case 2: printf("\nSend 29-bit ID=%X", CANAID); break; case 3: printf("\nRequest 11-bit ID=%X", CANAID); return; case 4: printf("\nRequest 29-bit ID=%08X", CANAID); return; } printf("\nMessage Length %d, Data: ", CAN0L); printf("%X … %X", CAN0B0, …, CAN0B7);

32 Need More Help? Application Notes on www.keil.com/appnotes
192: Using TCP/IP Examples on ARM Powered Evaluation Boards 195: Developing HID USB Device Drivers For Embedded Systems

33 RTX Real-Time Kernel

34 Why use a Real-Time Kernel?
Building Block Software / Hardware interface layer Easy expansion of system software Hardware independent House Keeping Process scheduling CPU resource management Task communication Focus on Application Development Leave basic system management

35 Software Concepts for ARM
The ARM core requires a different mindset for embedded applications. ARM7 & ARM9 have just two interrupt levels Standard (IRQ) and Fast (FIQ) but provide CPU modes with separate interrupt stacks for predictable stack requirements. ‘main’ as End-less Loop Solution for simple applications Usage together with powerful multi-level interrupt system Stack usage un-predictable Using a Real-Time Kernel Allows application to be separated into independent tasks Message passing eliminates critical memory buffers Each task has an own stack area Interrupt communication with event flags and messages

36 What makes a Good RTOS Performance Ease of Use System Friendly
Predictable behaviour Low latency High number of interrupt levels Ease of Use Flexible API and implementation Tool-chain integration. Scheduling options Multitasking, Preemptive, Round Robin. System Friendly Consumes small amount of system resource Proven Kernel Low cost

37 Real-Time? Real-Time does not equal High Speed
Not all tasks are ‘Super High Speed’ Systems perform to deadlines Tasks need to complete before deadline and other tasks Real-Time OS not to be confused with high speed requirements Real-Time, not mission critical Varying levels of Real-Time Hard, Firm, Soft and Non RTOS not confined to critical systems Real-Time OS = Building Block RTOS provides easy Multitasking Environment House keeping tasks

38 RTX Features Main Features
Full-featured Real-Time kernel meets the requirements of a ‘good’ real-time kernel Main Features Multi-Tasking – Round Robin, Pre-emptive, Cooperative Unlimited – User Timers, Semaphores and Mailboxes Royalty free Task Specifications Priority Levels 256 No. of Tasks Defined Unlimited No. of Tasks Active Context Switch < 300 Cycles Interrupt Latency < 100 Cycles Memory Requirements Bytes CODE Space (depending on used functionality) 1.5K – 5K RAM Space (each active task requires an own stack space) < 500

39 RTX Real-Time Kernel Full-featured Real-Time kernel designed to meet the challenges of Embedded System Design Process Management Create and delete tasks Change task priorities Event flag management Interrupt functions CPU resources Multi-Tasking Preemptive context switching Scheduling Semaphore management Real-Time Control Deterministic behaviour Inter-task Communication Mailbox management Interface to interrupt functions Memory Allocation Thread-safe (usage even in ISR)

40 Tool Chain Integration
RTX is fully integrated into RealView MDK for easy development and debugging Compilation Tasks are integrated into the RealView C Compiler language. Close integration in RealView MDK (µVision) µVision IDE automatically includes RTX Libraries void task1 (void) _task { … code of task 1 placed here…. }

41 RTX Setup All major parameters of RTX can be easily changed using the µVision configuration wizard.

42 Kernel Aware Debugging
RTX and µVision are tightly integrated, kernel aware debugging is fully supported. Tasks and Event analysis Resource Loading Allowing resource optimisation 42

43 RL-ARM Examples RTX Real-Time Kernel

44 RTX Examples Traffic Light
LED’s are timed or controlled by push button Utilizes interrupt control, event management and multitasking capabilities of RTX Kernel Demonstrates RTX concepts

45 RTX Examples CAN Example using RTX Mailbox and event handling
CAN Send (Tx) – shows automatic data handling capabilities CAN Rec – message checking with instant message receipt – task wait and return – almost impossible without Real-Time Kernel Analog Input Voltage CAN Tx Incremental Script CAN Rec LED’s

46 Get More Information Application Notes Program Examples
Customers use on a daily basis to obtain program examples, latest technical information, and support. Application Notes Program Examples Device Database Support Knowledgebase Discussion Forum


Download ppt "Real-Time Library TCPnet Networking Suite Flash File System USB and CAN Interfaces RTX Real-Time Kernel."

Similar presentations


Ads by Google