The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Software Development Systems ABSTRACT This document describes usage de


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



DSP/BIOS Device Driver TMS320C5509
Software Development Systems ABSTRACT This document describes usage design generic TMS320C5509 multimedia card (MMC) device driver. This device driver written conformance DSP/BIOS device driver model handles communication from MMC. uses controller access card. used general-purpose stand-alone mini-driver access Multimedia card used media driver file system driver. Features:
Non-blocking input/output mechanism. Multiple channels created same physical device. Provides facility abort flush operations particular channel. driver specified using configuration structures. Designed (but limited with file system drivers.
Trademarks property their respective owners.
SPRA881A
Contents Usage Configuration Device Parameters 1.2.1 Device Global Object
Architecture Data Structures 2.1.1 Channel Object 2.1.2 Read/Write Structure Mini-Driver Functionality 2.2.1 Device Binding 2.2.2 Channel Creation 2.2.3 Channel Deletion 2.2.4 Read/Write Operations 2.2.5 Flush/Abort Operations 2.2.6 Control Commands Packet Processing Queue Management Interrupt Handling Constraints References
Appendix Device Driver Data Sheet Device Driver Library Name DSP/BIOS Modules Used DSP/BIOS Objects Used Modules Used Interrupts Used Peripherals Used Interrupt Disable Time Memory Usage List Figures Figure Figure Media Device Driver Usage Request queue after flush operation List Tables Table Table Table Byte Order Values Interrupts Device Driver Memory Usage
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Usage
device driver described here mini-driver. That implemented lower layer 2-layer device driver model. upper typically, limited DSP/BIOS class driver that provides application common interface requests. more information about device driver model well other DSP/BIOS class drivers, DSP/BIOS Device Driver Developer's Guide (SPRU616). This media driver used media driver interface with peripheral file system drivers TMS320C5509 chips. However, also used general-purpose stand-alone mini-driver interface with MMC. Figure shows data flow hierarchy between components system when using driver media driver file system.
Application
File System Driver (optional)
Media Driver
Mini-Driver
Chip Support Library
Figure Media Device Driver Usage
Configuration
this device driver, device entry must added DSP/BIOS configuration tool user defined device drivers. properties device entry described below:
Init function table: C5509_MMC_init. Function table ptr: C5509_MMC_FXNS. Function table type: Select IOM_Fxns. Device this 0x1, depending controller being used. there only instance on-chip controller, this 0x0. Device used controller with base address 0x4800, Device used controller with base address 0x4C00.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Device params ptr: pointer device parameter structure (described following section). This property should never 0x0, since driver does default parameters. This pointer object type C5509_MMC_DevParams defined header file c5509_mmc.h. Device global data ptr: pointer device global handle structure. This pointer object type C5509_MMC_DevObj defined header file c5509_mmc.h
Device Parameters
pointer this structure should passed when device entry made configuration tool.
typedef struct _C5509_MMC_DevParams versionId; MMC_InitObj devParams; C5509_MMC_DrvrParams drvrParams; ier0Mask ier1Mask C5509_MMC_DevParams;
where, MMC_InitObj defined csl_mmcdat.h follows: typedef struct Uint16 dmaEnable; Uint16 dat3EdgeDetection; Uint16 goIdle; Uint16 enableClkPin; Uint32 fdiv; Uint32 cdiv; Uint16 rspTimeout; Uint16 dataTimeout; Uint16 blockLen; MMC_SetupNative, MMC_InitObj;
C5509_MMC_DrvrParams defined
typedef struct _C5509_MMC_DrvrParams mmcCardId; noChan; byteOrder; mmcDmaChR; mmcDmaChWR; *bufR; *bufWR; struct _C5509_MMC_ChanObj *pChan; C5509_MMC_DrvrParams;
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Fields C5509_MMC_DevParams:
versionId: Version number driver. devParams: These specific configuration operation parameters. drvrParams: These driver specific configuration parameters would have nothing specific device. ier0Mask: Interrupt enable register mask, ISR. ier1Mask: Interrupt enable register mask, ISR.
Fields MMC_InitObj: dmaEnable: This enables/disables mode data read write. Currently driver works only non-DMA mode. dat3EdgeDetection: This field reserved internal use. goIdle: This parameter specifies whether should idle state when IDLE instruction given not. This should always enableClkPin: This field reserved internal use. fdiv: This parameter specifies divide down factor processor clock function clock. cdiv: This parameter specifies divide down factor function clock memory clock. rspTimeout: This parameter specifies number memory clocks wait before reporting response timeout once command issued. dataTimeOut: This parameter specifies number memory clocks wait before reporting data timeout. blockLen: This parameter specifies block size bytes) read/write operations. This should size sector media.
Fields C5509_MMC_DrvrParams:
mmcCardId: This relative card address (RCA) application. value should positive value greater than zero. noChan: This parameter specifies maximum number channels required this device. byteOrder: This parameter specifies order which bytes should retrieved. take values shown Table Table Byte Order Values
Value MEDIA_BYTESWAP MEDIA_BYTENORMAL Description Swap bytes each word before returning application. Don't swapping bytes.
NOTE: These defined media.h.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
1.2.1
mmcDmaChR: This parameter specifies channel number read operation. This will unused current non-DMA mode. mmcDmaChWR: This parameter specifies channel number write operation. This will unused current non-DMA mode. bufR: This provides buffer read (unused non-DMA mode). bufWR: This provides buffer write (unused non-DMA mode). pChan: This pointer array channel objects (noChan number channel objects). bufR: This provides buffer read (unused non-DMA mode). bufWR: This provides buffer write (unused non-DMA mode). pChan: This pointer array channel objects (noChan number channel objects).
Device Global Object
driver internally maintains state information device context. uses C5509_MMC_DevObj structure. structure shown below.
typedef struct _C5509_MMC_DevObj mmcDevNum; C5509_MMC_DrvrParams drvrParams; MdUns blockLen; QUE_Obj pendList; IOM_Packet *currPacket; MMC_CardObj cslCards; MMC_Handle cslMMC; MdUns buf[C5509_MMC_SECLEN]; chOpenCount; C5509_MMC_DevObj;
mmcDevNum: This stores integer value indicating base address that being used. DEVICE0 (0x4800) DEVICE1 (0x4C00)
blockLen: This stores block size bytes) read/write operations. pendList: This used maintain queue pending jobs. currPacket: This stores pointer current packet being processed. cslCards: card object obtained from chip support library during initialization. cslMMC: handle obtained from chip support library after opening. buf[C5509_MMC_SECLEN]: Buffer reserved mini-driver. Sector length (C5509_MMC_SECLEN) words.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
chOpenCount: Number logical channels open device that this device object represents.
Architecture
This section provides architectural details mini-driver. describes design implementation device driver. various data structures used also explained along with internal queue management. driver uses various DSP/BIOS modules (see Appendix
Data Structures
This device driver uses data structures maintain internal state. data that common across instances, instance controller, maintained global state structure (C5509_MMC_DevObj) that described previous sections. data each channel that opened device maintained channel object. This channel object structure discussed this section. This section also describes structure used driver maintain request information read/write operations.
2.1.1
Channel Object
driver internally maintains channel context state information using C5509_MMC_ChanObj structure. pointer this structure returned handle during channel creation operation.
typedef struct _C5509_MMC_ChanObj mode; error; Bool inUse; IOM_TiomCallback callback; callbackArg; C5509_MMC_DevObj *pHandle; C5509_MMC_ChanObj;
mode: This field indicates mode which device been opened. This value will always IOM_INOUT driver. error: This holds error status this channel. inUse: This maintains usage status channel object, indicating whether free. callback: This callback routine supplied class driver. callbackArg: This field holds callback arguments passed class driver while invoking call back pHandle: Pointer global device handle.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
2.1.2
Read/Write Structure
media read write structure used store information request made application.
typedef struct _MEDIA_RdWrObj buf; LgUns address; LgUns subAddress; LgUns length; reserved[24]; MEDIA_RdWrObj;
buf: This contains pointer buffer specified application used performing read/write operations. This must point word-aligned buffer. address: This field indicates sector from which read from media. subAddress: offset position sector specified SectorNumber. length: number words read. should more than number words sector. reserved: This area reserved driver.
Mini-Driver Functionality
driver implements interfaces required DSP/BIOS driver model. mini- driver specification, implements functions bind device, create delete channel, submit control operations.
2.2.1
Device Binding
Device binding done during initialization system. This performs required initialization sets operational mode. maximum number channels required opened simultaneously passed this call. memory channel objects also passed driver bind parameters.
2.2.2
Channel Creation
This function will used class driver create channel read/write operations. driver should always opened input/output mode. driver returns pointer free channel available handle. channels use, then returns error. This happens when application tries open more than specified number channels. Once channel creation succeeds, driver marks that channel use. driver also fills additional status field supplied before returning.
2.2.3
Channel Deletion
This function will used class driver close open channel. This takes handle that created create call. Before returning, driver marks channel free.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
2.2.4
Read/Write Operations
mini-driver itself handles read/write operations asynchronously. read/write requests come driver through submit call from other class-driver adapter. requests driver queued handled time. Once operation complete, request removed from queue callback function invoked indicating request completion. application read/write maximum sector data time. read request takes sector number, offset number words read. data read from media copied into application-supplied buffer. completion operation, data requested application will present buffer callback function invoked. write request takes sector number, offset number words write. data written media will present application-supplied buffer. data buffer will written media after completion this operation, callback function invoked.
2.2.5
Flush/Abort Operations
driver allows application flush abort pending request channel. current operation continued until completion. pending read/write requests flushed/aborted (depending operation requested). driver traverses through request queue identifies requests this channel. operation flush, pending write requests completed pending read requests return with IOM_FLUSHED. operation abort, pending requests (input output) aborted return with status IOM_ABORTED. both cases, current operation allowed complete normally.
2.2.6
Control Commands
This driver supports control commands. MEDIA_CTRL_GETMEDIATYPE querying media type supported this driver. other provide ability re-initialize controller peripheral called MEDIA_CTRL_REINITIALIZE. case irrecoverable error reported application, must invoke MEDIA_CTRL_REINITIALIZE before further interaction with driver. Invoking this resets device.
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Packet Processing
mini-driver submit function invoked perform (read/write/abort/flush) operation. example, class driver passes packet each operation. packet carries information required carry operation including command, data, size status. mini-driver looks command field takes necessary action. requests processed asynchronously. read/write operation, request added queue before returning. packets processed FIFO order when operation complete, status field updated with status completion callback function invoked indicating class driver that this packet freed used again). status will filled with following values:
IOM_COMPLETED IOM_PENDING IOM_ABORTED IOM_FLUSHED
abort command, driver completes pending read/write requests invoking callback function with status IOM_ABORTED case class driver frees these packets (i.e., places free queue reuse). flush command, driver completes pending read requests invoking callback function with status IOM_FLUSHED class driver frees these packets. write requests completed. case abort flush, current operation continued without stopping.
Queue Management
driver handles read/write requests asynchronously. achieve this, maintains queue requests that contains requests channels opened. Requests processed order their arrival (FIFO). requests added tail requests removed from head queue processing. request queue holds list pending requests. Initially, shown Figure (a), request queue empty. Assume there channels operation channel channel both requesting some read/write operations. queue would look like Figure (b). application requests FLUSH operation particular channel, then queue traversed read requests removed. example, application calls flush channel1, queue will look like Figure (c).
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Empty queue
Request read channel
Request write channel
Request read channel
Request read channel
Request read channel
Request read channel
Request write channel
Request flush channel
Request read channel
Figure Request queue after flush operation driver waits until pending write operation channel completed before returns flush call. application asks ABORT operation particular channel, read/write requests removed from queue. flush abort operations, operation that progress will stopped. Flush called class driver before deleting when application requests channel closed. DSP/BIOS Que_Obj used handle queue management.
Interrupt Handling
controller C5509 generates interrupt conditions listed Table driver handles these interrupts. Table Interrupts
Interrupt DRRDY DXRDY CRCRS CRCRD CRCWR TOUTRS TOUTRD RSPDNE BSYDNE DATDNE Description Data receive ready interrupt Data transmit ready interrupt Response errors interrupt Read-data errors interrupt Write-data error interrupt Response time-out interrupt Read-data time-out interrupt Response/command done interrupt Busy done interrupt Data transfer done interrupt
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Constraints
This device driver currently operates only non-DMA mode, does operate mode. This driver does support multiple cards system.
References
DSP/BIOS Driver Developer's Guide (SPRU616) TMS320C55x Peripherals Reference Guide (SPRU317) TMS320C55x Chip Support Library Reference Guide (SPRU433B) TMS320C5000 DSP/BIOS Application Programming Interface (API) Reference Guide (SPRU404D)
DSP/BIOS Device Driver TMS320C5509
SPRA881A
Appendix
Device Driver Library Name
Device Driver Data Sheet
C5509_mmc.l55 (small memory model) C5509_mmc.l55l (large memory model)
DSP/BIOS Modules Used
Hardware Interrupt Manager Queue Manager
DSP/BIOS Objects Used
QUE_Obj
Modules Used
module controller
Interrupts Used
controller interrupt (HWI interrupt vector devId interrupt vector devId 0x1) C5509.
Peripherals Used
On-chip controller
Interrupt Disable Time
Maximum time that hardware interrupts disabled driver: cycles. This measurement taken using compiler option -O3.
Memory Usage
Table A-1. Device Driver Memory Usage
Uninitialized memory CODE DATA (8-bit bytes) Initialized memory 2694 (8-bit bytes) (8-bit bytes)
NOTE: This data gathered using sectti command utility. Uninitialized data: .bss Initialized data: .cinit .const Initialized code: .text .text:init
DSP/BIOS Device Driver TMS320C5509
IMPORTANT NOTICE Texas Instruments Incorporated subsidiaries (TI) reserve right make corrections, modifications, enhancements, improvements, other changes products services time discontinue product service without notice. Customers should obtain latest relevant information before placing orders should verify that such information current complete. products sold subject TI's terms conditions sale supplied time order acknowledgment. warrants performance hardware products specifications applicable time sale accordance with TI's standard warranty. Testing other quality control techniques used extent deems necessary support this warranty. Except where mandated government requirements, testing parameters each product necessarily performed. assumes liability applications assistance customer product design. Customers responsible their products applications using components. minimize risks associated with customer products applications, customers should provide adequate design operating safeguards. does warrant represent that license, either express implied, granted under patent right, copyright, mask work right, other intellectual property right relating combination, machine, process which products services used. Information published regarding third-party products services does constitute license from such products services warranty endorsement thereof. such information require license from third party under patents other intellectual property third party, license from under patents other intellectual property Reproduction information data books data sheets permissible only reproduction without alteration accompanied associated warranties, conditions, limitations, notices. Reproduction this information with alteration unfair deceptive business practice. responsible liable such altered documentation. Resale products services with statements different from beyond parameters stated that product service voids express implied warranties associated product service unfair deceptive business practice. responsible liable such statements.
Mailing Address: Texas Instruments Post Office 655303 Dallas, Texas 75265
Copyright 2003, Texas Instruments Incorporated

Other recent searches


VX-2 - VX-2   VX-2 Datasheet
TC1232 - TC1232   TC1232 Datasheet
NJM2041 - NJM2041   NJM2041 Datasheet
MMM7400 - MMM7400   MMM7400 Datasheet
MDC160TS120 - MDC160TS120   MDC160TS120 Datasheet
FMT200-ECO2 - FMT200-ECO2   FMT200-ECO2 Datasheet
AB-25 - AB-25   AB-25 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive