Download presentation
Presentation is loading. Please wait.
Published byAxel Edling Modified over 9 years ago
2
HL CE M, lehmann usb_tele ESC spring.ppt 1 - 4/17/2015, 10:34 START first foil
3
HL CE M, lehmann usb_tele ESC spring.ppt 2 - 4/17/2015, 10:34 Agenda USB basics - - Why USB - - Bus structure - - Enumeration, speed - - Layer model - - Physical interface - - Transfer, transaction, packet USB - ISDN Terminal Adapter (TA) - Standard TA (PC ISDN card) - USB TA - Endpoints usage, ISDN data format - Hardware implementation, Buffering - B-channel performance - Layer model USB TA PC ISDN card - D-channel signalization through USB - D-channel performance - Hardware platform, tools - SAB-C541U
4
HL CE M, lehmann usb_tele ESC spring.ppt 3 - 4/17/2015, 10:34 USB based Microcontroller in Telekom Peripherals for PC's...the interfacing solution
5
HL CE M, lehmann usb_tele ESC spring.ppt 4 - 4/17/2015, 10:34 ISDN Terminal Adapter (TA) Digital Communication Modem Analog line Fax Analog line ISDN line ISDN Line Standard ISDN PC Card (TA) 64Kbit/s Standard ISDN PC Card Internet Service provider has to offer an ISDN connection...connect to ISDN
6
HL CE M, lehmann usb_tele ESC spring.ppt 5 - 4/17/2015, 10:34 Standard ISDN PC Card Enhanced SW on PC same ISDN PC Card ISDN Line ISDN line Analog line ISDN Line Standard ISDN PC Card Modem ISDN TA "Modem" "Connecting the Digital to the Analog World"...connect to ISDN Fax
7
HL CE M, lehmann usb_tele ESC spring.ppt 6 - 4/17/2015, 10:34 IPAC(PSB2115) PCI Bus Example for a Passive low-cost ISDN PC-Card (TA)...connect to ISDN
8
HL CE M, lehmann usb_tele ESC spring.ppt 7 - 4/17/2015, 10:34 "Passive" USB low-cost ISDN TA IPAC(PSB2115) SAB-C541 IOM-2...connect to ISDN
9
HL CE M, lehmann usb_tele ESC spring.ppt 8 - 4/17/2015, 10:34 USB Transfer types...basics Control (e.g.: configuration, messages) - bursty, host initiated (bus management, configuration) - guaranteed bandwith of max. 10% - error-free data delivery guaranteed Interrupt (e.g.: mouse, joystick....) - small bursty, low bandwidth required - error-free data delivery guaranteed - polling is used (by host) to check for "interrupt events” - polling intervall programmable. From1msto 255ms (FS) 10msto 255ms (LS) Isochronous (e.g.: audio, telephony.....) - for data which need to be periodically sent - predictable latency on data delivery. - no error check, error-free data delivery is not guaranteed Bulk (e.g.: printer, scanner, still camera.....) - non periodic, bursty, ideal for large amounts of data - error-free data delivery guaranteed
10
HL CE M, lehmann usb_tele ESC spring.ppt 9 - 4/17/2015, 10:34 Frame = 1msprinter Contro l USB Frame Model example Stereo Audio Telephony SOF low-speed Isochronou s Bul k Interrup t...basics printer any lowspeed device like keyboard, mouse, etc. Bul k
11
HL CE M, lehmann usb_tele ESC spring.ppt 10 - 4/17/2015, 10:34 Implementation With a Single USB Interface, Endpoint Assignment...connect to ISDN DirectionNumberFunctionEndpointtype InputOutput0 device configuration (IN / OUT), device control Control Output2 B1 and B2 chan. data transmission Isochronous Output4 D-channel control and D-channel data reception Isochronous Input1 B1 and B2 channel data reception Isochronous IsochronousInput3 D-channel control and D-channel data transmission Sync feedback information for EP2
12
HL CE M, lehmann usb_tele ESC spring.ppt 11 - 4/17/2015, 10:34 Which data has to be transferred? D - channel B1 - channel B2 - channel Data / Address bus IPAC SAB-C541U D - OUT pipe (isochronous) B1 / B2 - IN pipe (isochronous) B1 / B2 - OUT pipe (isochronous) D - IN pipe (isochronous) interrupt...connect to ISDN
13
HL CE M, lehmann usb_tele ESC spring.ppt 12 - 4/17/2015, 10:34 USB Timing is Asynchronous to the ISDN Timing - every 125µs is an IOM -2 frame interrupt generated - external interrupt 1 is used to keep track of the IOM -2 data frame timing - each USB frame may contain 7, 8 or 9 IOM -2 frames - complex circular buffers are needed...connect to ISDN
14
HL CE M, lehmann usb_tele ESC spring.ppt 13 - 4/17/2015, 10:34 IPAC (PSB 2115) Control Register D-channel transmission B1 channel B2 channel B1 channel B2 channel D-channel reception InternalRegister USB Timing Asynchronous to ISDN Timing Overview, logical connection SAB-C541U USB Buffer (265 Bytes) EP1 IN - ISO (18 byte) 1. B1, B2 in max. 9. B1, B2 in (2 Byte every 125µs) transfer controlled by C'51 µC code EP0 Control EP4 IN - ISO EP3 OUT - ISO EP2 OUT - ISO (18 byte) max. 9. B1, B2 out 1. B1, B2 out (2 Byte every 125µs) Interrupt controlled every 125µs
15
HL CE M, lehmann usb_tele ESC spring.ppt 14 - 4/17/2015, 10:34 - Depending on the ISDN input - two Bytes will be added or subtracted by the HOST (PC) - ISDN will feed-in 14,16 or 18 Bytes per USB frame (1ms) 32 Bytes This is supported within the On-chip USB buffer (256Bytes) B1B2 B1B2-2 B1B2B1B2B1B2B1B2B1B2B1B2B1B2 - The standard transmitted length is 16 Bytes - B1 and B2 are placed multiplexed into the pipe Every B-channel ISO-pipe is defined with the length 32 Bytes Isochronous Pipes Supporting B-Channel Data transfer (EP1 + EP2)...B-channel pipes 2468 16 1012 14 16 Bytes (default) B1B2 18 18 Bytes (overflow) B1B2+2 14 14 Bytes (underflow)
16
HL CE M, lehmann usb_tele ESC spring.ppt 15 - 4/17/2015, 10:34 USB Dual Buffers Support for Isochronous Pipes e.g. USB read access 1) USB buffer is empty and CPU buffer is filled. 2) CPU buffer is full and swapped to USB side. USB read action enabled. 3) USB buffer is read out while CPU writes to its own page. 4) USB buffer is empty, CPU buffer is not yet full. 5) CPU Buffer is full and swapped to USB side. USB read action enabled. 6) USB buffer is read out while CPU writes to its own page.
17
HL CE M, lehmann usb_tele ESC spring.ppt 16 - 4/17/2015, 10:34...SW solution void my_func (void) interrupt 9 {EPSEL = IN_CHANNEL_NR; /* select EP number */ B1_IN = USBVAL; /* USBVAL = SFR which passes data to the */ B1_IN = USBVAL; /* USBVAL = SFR which passes data to the */ B2_IN = USBVAL; /* Internal USB module, */ B2_IN = USBVAL; /* Internal USB module, */ D_CI_IN = USBVAL; /* this easy and fast data access */ D_CI_IN = USBVAL; /* this allows easy and fast data access */ MON_IN = USBVAL; MON_IN = USBVAL; SW Example to access the USB buffers included in the SAB-C541U EPSEL = OUT_CHANNEL_NR; EPSEL = OUT_CHANNEL_NR; USBVAL = B1_OUT; /* in both directions! */ USBVAL = B1_OUT; /* in both directions! */ USBVAL = B2_OUT; USBVAL = B2_OUT; USBVAL = D_CI_OUT; USBVAL = D_CI_OUT; USBVAL = MON_OUT; USBVAL = MON_OUT; if(++int_cnt==8){ /* e.g. packet size 8 bytes */ EPBSn = EPBSn | DONE_;/* set USB buffer FULL for OUT CHANNEL */ EPBSn = EPBSn | DONE_;/* set USB buffer FULL for OUT CHANNEL */ EPSEL = IN_CHANNEL_NR; /* select endpoint for IN CHANNEL */ EPSEL = IN_CHANNEL_NR; /* select endpoint for IN CHANNEL */ EPBSn = EPBSn | DONE_;/* set USB buffer FULL for CHANNEL */ EPBSn = EPBSn | DONE_;/* set USB buffer FULL for CHANNEL */ int_cnt = 0; }} int_cnt = 0; }}
18
HL CE M, lehmann usb_tele ESC spring.ppt 17 - 4/17/2015, 10:34 B1, B2...SW solution IN_read_ptr ISAC-S ISAC-S IN_read_ptr ISAC-S IN_read_ptr ISAC-S IN_read_ptr ISAC-S IN_read_ptr ISAC-S IN_read_ptr ISAC-S ISAC-S IN Queue OUT Queue IOM-2 Int.ISAC-S OUT_write_ptr ISAC-S OUT_write_ptr ISAC-S OUT_write_ptr ISAC-S OUT_write_ptr OUT_write_ptr ISAC-S IN_read_ptr SOF Int. OUT_write_ptr IN_write_ptr OUT_read_ptr OUT_write_ptr ISAC-S 14, 16 or 18 Bytes from B1, B2 B-channel, Circular Buffers SW Implementation IN_write_ptr OUT_read_ptr ISAC-S B1, B2
19
HL CE M, lehmann usb_tele ESC spring.ppt 18 - 4/17/2015, 10:34...SW solution SW Implementation; Both B-channel Directions handled parallel OUT_Queue (circular Buffer ) empty ? SOF-Interrupt (1ms) write data to USB memory USB_FIFO = OUT_Queue (B1) USB_FIFO = OUT_Queue (B2) Return from Interrupt YES NO USB memory empty ? read data from USB memory IN_Queue (B1) = USB_FIFO IN_Queue (B2) = USB_FIFO YES NO IOM-2 Interrupt read from circular Buffer (internal RAM of C54x) B1_IOM (DU) = IN_Queue B2_IOM (DU) = IN_Queue write to circular Buffer (internal RAM of C54x ) OUT_Queue = B1_IOM (DD) OUT_Queue = B2_IOM (DD) Return from Interrupt (125µs)
20
HL CE M, lehmann usb_tele ESC spring.ppt 19 - 4/17/2015, 10:34 Results, Performance Requirements ISDN B channel data transfer...connect to ISDN Both interrupt service routines carry out two B-channels (in both directions) simultaneously The IOM interrupt service routine is called every 125µs and has the highest priority - the maximum runtime of the IOM interrupt service routine is 64 cycles (32µs) - ~25% of the C541U computing performance is required. The USB interrupt service routine is called every 1000µs - the maximum runtime of the USB interrupt service is ~460 cycles (230µs) - the USB interrupt service routine will be interrupted (max. twice) by the IOM interrupt service routine - 23% of the C541U computing performance is required. As a result, the C541U will spend 49% of its computing performance on maintaining the two B-channels through the isochronous pipes.
21
HL CE M, lehmann usb_tele ESC spring.ppt 20 - 4/17/2015, 10:34 CAPI CAPI Common ISDN Application Interface Layer Models: ISDN PC Card vs. USB ISDN TA HW-Interface ISA/PCI Bus Register I/O Virtual HW (ISDN controller) USB ISDN USB-standard OS-driver Applications IPAC(PSB2115) IPAC(PSB2115) Firmware on SAB-C541U Register I/O USB pipes physicalconnectionHOSTDevice Unpredictable Delays! Unpredictable Delays!...connect to ISDN
22
HL CE M, lehmann usb_tele ESC spring.ppt 21 - 4/17/2015, 10:34 SAB-C541U IPAC...connect to ISDN D-channel Control and Frame Transfer The firmware supports the following D-channel related functions via specific isochronous commands: - D-channel controller and S-transceiver initialization - D-channel frame transmission - layer-1 status control - HDLC controller reset The USB ISDN TA firmware reports the following D-channel related information via the isochronous pipe to the host - received D-channel frames - layer-1 status information - HDLC controller status information, e.g. the completion of a D-channel frame transmission
23
HL CE M, lehmann usb_tele ESC spring.ppt 22 - 4/17/2015, 10:34 The 8 Bytes are filled with commands from the PC to the IPAC (via the microcontroller):...D-channel pipes D-Channel Pipes Isochronous OUT (EP4) D1D2D3D4D5D6D7D0 8 Bytes - D-channel controller and S-transceiver initialization - D-channel frame transmission - layer-1 status control - HDLC controller reset
24
HL CE M, lehmann usb_tele ESC spring.ppt 23 - 4/17/2015, 10:34 D1D2D3D4D5D6D7 D0 8 Bytes...D-channel pipes D-Channel Pipes Isochronous OUT (EP4), details [ o p t i o n a l p a r a m e t e r s ] CMD ID CMD ID = command identification Opt. parameters - data referring to command ID
25
HL CE M, lehmann usb_tele ESC spring.ppt 24 - 4/17/2015, 10:34 (01) ext. RAM frag. counter stack (PC)...D-channel pipes D-Channel Pipes Isochronous OUT (EP4), example D1D2D3D4D5D6D7 D0 [ o p t i o n a l p a r a m e t e r s ] CMD ID CMD ID e.g.send data - data will be split in fragments (opt. parameters) - fragments will be buffered in device D1 D2 D3 D4 D5 D6 D7 ID t 0 + 49ms (02) (49) (02) (49) (01) D1 D2 D3 D4 D5 D6 D7 t 0 +1ms ID D1 D2 D3 D4 D5 D6 D7 t0t0 ID controlled by µC length (e.g. 49)
26
HL CE M, lehmann usb_tele ESC spring.ppt 25 - 4/17/2015, 10:34 B1B2B1B2B1B2B1B2B1B2B1B2B1B2B1B2 2468 16 1012 14 16 Bytes (default)...D-channel pipes D-Channel Pipes Isochronous IN (EP3), SYNC SYNC = synchronizing feedback for B-channel OUT 14 B1B2-2 18 B1B2 +2 - 14, 16 or 18 B-channel frames feedback D2D3D4D5D6D7 D0 8 Bytes [ i n d i c a t i o n ] SYNC D1 CMD ID
27
HL CE M, lehmann usb_tele ESC spring.ppt 26 - 4/17/2015, 10:34...D-channel pipes D-Channel Pipes Isochronous IN (EP3), CMD ID indication = acknowledge to ISDN commands - received D-channel frames - layer-1 status information - HDLC controller status information - e.g. the completion of a D-channel frame transmission D2D3D4D5D6D7 D0 8 Bytes SYNC D1 CMD ID = command identification [ i n d i c a t i o n ] CMD ID
28
HL CE M, lehmann usb_tele ESC spring.ppt 27 - 4/17/2015, 10:34 Pool of memory blocks blocks poolofmemoryblocks...D-channel pipes D-Channel IN-Pipes, details CMD ID, e.g. layer-1 status information D2D3D4D5D6D7 D0 [ i n d i c a t i o n ] SYNC D1 CMD ID D0 SYC D1 Layer-1 status D3D4D5D6D7 Queue element including data D2 [ d a t a ] or D0 SYNC D1 pointer D3D4D5D6D7D2 Queue element including pointer [ p o i n t e r ]
29
HL CE M, lehmann usb_tele ESC spring.ppt 28 - 4/17/2015, 10:34 Queue for messages from device to USB Pool of memory blocks for temp. Storage of R-FIFO data bytes Pool of memory blocks for temp. Storage of R-FIFO data bytes Frame Transmission / Reception IPAC Memory block for temp. Storage of D-channel frame to be transmitted D-channel transmit data Transmit FIFO data additionalmessagesparameters Receive Data flow for the D-channel pipes Isochronous pipe messages Stausmessages Control Pipe Control pipe commands SAB-C541U Isochronous Pipe Pool of memory blocks for temp. Storage of R-FIFO data bytes
30
HL CE M, lehmann usb_tele ESC spring.ppt 29 - 4/17/2015, 10:34 Results, D-channel handling Performance Requirements The 16 kbit/sec data rate requires packets of 32 bytes - 32 bytes = size of the D-channel transmit and receive FIFOs - transferred from USB to the ISAC-S and vice versa in 16ms periods - In addition, the CPU-load for temporary storage of a D-channel frame has to be considered One additional notification from the USB ISDN TA to the host shall be generated in each 16ms period, too Instruction cycle is 500ns (@ 12MHz external) - max. 5000 cycles are needed to execute the sample routines. As a result, the C541U spends only ~20% of its computing performance on maintaining the D-channel....connect to ISDN
31
HL CE M, lehmann usb_tele ESC spring.ppt 30 - 4/17/2015, 10:34...connect to ISDN C541U CPU performance for handling an USB ISDN Terminal Adapter ProcedureSAB-C541UCPU-Load D-channel handling, transfer of D-channel messages from USB to IPAC and vice versa ~20% B-channel data transfer from USB to IPAC and vice versa ~50% ~70%
32
HL CE M, lehmann usb_tele ESC spring.ppt 31 - 4/17/2015, 10:34 Reference Design: USB ISDN Terminal Adapter...HW solution connects to ISDN
33
HL CE M, lehmann usb_tele ESC spring.ppt 32 - 4/17/2015, 10:34 USB-Microcontroller C540U Family...the interfacing solution
34
HL CE M, lehmann usb_tele ESC spring.ppt 33 - 4/17/2015, 10:34 C540U / C541U Block Diagram...the interfacing solution Oscillator Watchdog SSC (SPI) Interface (C541U only) Timer 0 Timer 1 Interrupt Unit Transceiver USBPLL Module OSC & Timing C500 Prog. Watchdog Timer (C541U only) RAM 256 x 8 OTP 4K x 8 (C540U) 8K x 8 (C541U) Emulation Support logic (E-Hooks) Port 0 Port 1 Port 2 Port 3 8 lines 6 / 8 lines 6 / 8 lines 1) 8 lines 1) P-LCC-44: 6lines; S-DIP-52: 8lines
35
HL CE M, lehmann usb_tele ESC spring.ppt 34 - 4/17/2015, 10:34 C540U Family List of Features - Enhanced 8-Bit C500-CPU - 500 ns Instruction Cycle Time @ 12 MHz CPU Clock - Two 16-bit Timer/Counters (C501 compatible T0/1) - [4kbytes in the C540U] 8 Kbytes OTP / 256 bytes RAM - USB Device Core (FS/LS speed) - Synchronous Serial Channel, Watchdog Timer [C541U only] - 30 digit. I/O Ports, 32 in SDIP52 - LED Driver capability on 3 dedicated pins, 10 mA / 4,5 to 5,5 V - Power supply voltage range: according to USB spec - Enhanced HooksTechnology - 48 MHz PLL on-chip for FS - Transceiver, D+ D-, on-chip...the interfacing solution 4kbytes in the C540U C541U only
36
HL CE M, lehmann usb_tele ESC spring.ppt 35 - 4/17/2015, 10:34 Infos on INTERNET...the interfacing solution Microcontrollers general: http://www.siemens.de/Semiconductor/Microcontroller/ http://www.siemens.de/Semiconductor/products/ICs/34/usb.htm...for infos on our USB parts
37
HL CE M, lehmann usb_tele ESC spring.ppt 36 - 4/17/2015, 10:34 END last foil
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.