![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX PM5356 S/UNI-622-MAX SOFTWARE DRIVER FOR THE S/UNI-622-MAX PRELIMINARY ISSUE 1 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PMC-Sierra, Inc. 105 - 8555 Baxter Place Burnaby, BC Canada V5A 4V7 604 .415.6000 PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PMC-Sierra, Inc. 105 - 8555 Baxter Place Burnaby, BC Canada V5A 4V7 604 .415.6000 PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX CONTENTS 1 OVERVIEW............................................................................................... 1 1.1 1.2 1.3 2 3 SCOPE .......................................................................................... 1 AUDIENCE..................................................................................... 1 OBJECTIVES................................................................................. 1 SOFTWARE DRIVER FEATURES ........................................................... 2 APPLICATION PROGRAMMER'S INTERFACE ....................................... 4 3.1 SOFTWARE ARCHITECTURE...................................................... 4 3.1.1 Application Interface............................................................ 5 3.1.2 RTOS Interface.................................................................... 5 3.1.3 S/UNI-622-MAX Hardware Interface ................................... 6 3.2 3.3 DRIVER FILES .............................................................................. 6 USING THE API TO ACCESS FEATURES OF THE S/UNI-622MAX ............................................................................................... 6 3.3.1 Access to Features via the Registers.................................. 7 3.3.2 Power-on Initialization, Self Test and Activation................... 7 3.3.3 Event Notification ................................................................ 8 3.4 DATA STRUCTURES ..................................................................... 8 3.4.1 tMaxState ............................................................................ 8 3.4.2 maxDDB............................................................................ 10 3.5 APPLICATION INTERFACE FUNCTION PROTOTYPES............. 11 3.5.1 maxEntryPoint ................................................................... 11 3.5.2 maxExitPoint ..................................................................... 11 i PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3.5.3 maxReset .......................................................................... 12 3.5.4 maxInit............................................................................... 12 3.5.5 maxActivate....................................................................... 12 3.5.6 maxIsr ............................................................................... 13 3.5.7 maxEnableInterrupts ......................................................... 13 3.5.8 maxDisableInterrupts ........................................................ 14 3.5.9 maxStatistics ..................................................................... 14 3.5.10 maxClearCounters ............................................................ 14 3.5.11 maxReadRegister ............................................................. 15 3.5.12 maxWriteRegister.............................................................. 15 3.6 RTOS INTERFACE FUNCTION PROTOTYPES .......................... 16 3.6.1 InstallIsr............................................................................. 16 3.6.2 InstallTimer........................................................................ 16 3.7 4 5 6 S/UNI-622-MAX INTERFACE FUNCTION PROTOTYPES .......... 17 APPENDIX A. SOURCE CODE.............................................................. 18 REFERENCES ....................................................................................... 19 SOFTWARE CUSTOMER FEEDBACK FORM....................................... 20 ii PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 1 1.1 OVERVIEW Scope A software driver for the S/UNI-622-MAX (PM5356) is described in this document. The driver is written in C language and is structured such that it is reusable and can be ported to a user's environment with minimal modification. The application programmer's interface (API) and an example of how to operate the S/UNI-622-MAX via this API is presented. The driver is built and tested on the S/UNI-622-MAX reference design[1]. The software driver interfaces to the MC68332 processor of the reference design board via processor dependent software, a simple software dispatcher and a serial port interface. A thorough description of this additional software is not covered in this document, nor is it supported, but the source code is made available to users with the driver source code. This driver source code is preliminary and not fully tested at the time this document was issued. Please contact PMC for the latest status of the source code. 1.2 Audience The intended audience for this document is Software Engineers that use this software to gain familiarity with the operation of the S/UNI-622-MAX product, or to use this software in their own systems. 1.3 Objectives The objective of making this driver available is to provide an example that may shorten the learning curve and development time that users require to write S/UNI-622-MAX drivers for their own systems. It also allows use of the reference design as an evaluation/development vehicle, for users to gain familiarity with the S/UNI-622-MAX and for users to code/unit test their own software while waiting for their own hardware prototypes - effectively allowing the user's hardware and software development to run in parallel. 1 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 2 SOFTWARE DRIVER FEATURES The following features are provided by the software driver: * * * * * Driver supports multiple S/UNI-622-MAX chips. Driver abstracts each S/UNI-622-MAX into a logical device to provide access to these by device ID. Driver provides a device data block that allows the user to specify the configuration of logical devices. API routines are provided to reset, initialize or activate a logical device. Driver provides a header file that defines all registers and bit fields of the S/UNI-622-MAX to reduce the coding effort. The defines are parsed from the datasheet and provide a means to access features of the S/UNI-622-MAX directly by using the read/write register access routines of the API. API routines to poll and accumulate counter statistics An interrupt service routine to dispatch interrupt events to a user application Source code is written in ANSI C language. All source code that may need to be modified to port the driver to another environment is located within a separate file. All routines are re-entrant. The user can use semaphores to lock access to the device data block or the register space. Since the use of semaphores is dependent on the software environment it is left to the user to add them if necessary. Source code has debug macros that can be used during debug to dump error events to a console. * * * * * * The following features are provided as a user interface to the reference design hardware: * A serial port interface that accepts user commands and provides a log of events due to interrupts or accumulation of statistics. 2 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX * Commands that invoke the API routines, and allow the API data structures to be accessed. 3 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3 3.1 APPLICATION PROGRAMMER'S INTERFACE Software Architecture The S/UNI-622-MAX driver interfaces to software and hardware components as shown in figure 1. Each of these interfaces is described in the following sections. Communication between components is via function calls, and in the opposite direction, via function callbacks. The application programmer's interface (API) covers the function calls and data structures passed through the three planes shown in figure 1. These planes interface to the application component, the RTOS component, and the S/UNI-622-MAX hardware. The arrows show the direction of a function call. Figure 1. Interfaces of the S/UNI-622-MAX Driver $SSOLFDWLRQ )XQFWLRQ FDOOV ,QGLFDWLRQ FDOOEDFNV 6HUYLFH FDOOEDFNV 681,0$; 'HYLFH 'ULYHU 5726 6HUYLFH FDOOV 5HJLVWHU $FFHVV ,QWHUUXSW 681,0$; 4 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3.1.1 Application Interface The user's application task interfaces to the driver by making function calls that command the driver to carry out a specified operation on the S/UNI-622-MAX. The function prototypes are shown in section 3.5. Each S/UNI-622-MAX in a system is managed as a separate device with a unique data structure to manage it. For this reason the application must identify the device when making a driver function call with a device ID. When an event occurs within the S/UNI-622-MAX the driver must notify the user application that the event occurred. This is done via an Indication function callback with the device ID as a function parameter. 3.1.2 RTOS Interface The real-time operating system (RTOS) provides the environment for the driver and user application to run. Typically this would be a multi-tasking, single processor, environment with semaphores to protect critical sections of code or variables from being corrupted. The RTOS provides the following services to the driver: * * * * * * Install a system timeout, or periodic timer. Install an interrupt service routine that is dispatched when a S/UNI-622-MAX interrupt pin is active. Provide memory management services to map the register space, allocate data structures and translate between virtual and physical addressing. Creation and management of tasks. Task to task communication or message queues. Semaphores The simplest environment for this driver to operate in is a single task where the application is tightly coupled to the driver. In this case one task (the application) directly calls the API routines and another task (the RTOS) may call the service callback. The service callback could be the interrupt service routine or a routine that periodically polls and accumulates counter statistics. In this case the driver is 5 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX written such that there is no contention among the application task and the RTOS task for access to a S/UNI-622-MAX register or a field within the device data block. In a multi-tasking environment, where multiple applications may want to access the same device simultaneously, the user could provide a loosely coupled interface between the API and the application tasks. This would be implemented by a queing mechanism and/or semaphores to block another application task from calling an API routine of the device until the current API call has completed. 3.1.3 S/UNI-622-MAX Hardware Interface The S/UNI-622-MAX hardware interfaces to the driver via register access and via an interrupt pin. 3.2 Driver Files The driver is designed for use with the reference design board[1] and some of the interfaces may need to be modified or ported to the user's environment. An implementation file and a header file with the functions and defines that may need to be modified to port the driver to another environment have been supplied in the files "max_p.h" and "max_p.c". The registers and bit fields of the S/UNI-622-MAX have been taken from the datasheet[2] and placed in the header file "max_r.h". Further datasheet related defines are provided in the file "max_d.h". The files "max.h" and "max.c" provide the rest of the driver. An example application is provided by the file "app.c". 3.3 Using the API to Access Features of the S/UNI-622-MAX This software driver provides a framework for users to integrate the S/UNI-622-MAX into their own systems. It provides an API of routines that all users of the S/UNI-622-MAX would require. Additional features of the S/UNI-622-MAX, such as access to overhead, diagnostics or configuration are available directly to the user via read/write functions of the API, and by using the header files that define all registers and bit fields. 6 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3.3.1 Access to Features via the Registers For example, the following code segment shows how a user could modify the value of the outgoing Path Signal Label (C2 byte) and read the receive path signal label. U8 Value; DeviceId = DEVICE_ID_CHIP1; /* modify the transmit path signal label for ATM payload*/ maxWriteRegister(DeviceId,REG_48_TPOP_Path_Signal_Label,0x13); /* read the receive path signal label */ maxReadRegister(DeviceId,REG_37_RPOP_Path_Signal_Label,&Value); 3.3.2 Power-on Initialization, Self Test and Activation A user will typically modify the "maxEntryPoint(...)" function for their application environment and perform power-on initialization and self test (POST) of their system. For this reason the user may need to reset, initialize and activate the S/UNI-622-MAX directly via the API to place it in an operational state following the POST. The following example illustrates this: /* perform power-on initialization of the S/UNI-622-MAX */ maxEntryPoint(); /* power on self test : configure a diagnostic loopback */ DeviceId = DEVICE_SUNI_622_MAX_1; pDevice = maxGetDevice(DeviceId); pDevice->InitVector = NULL; pDevice->ActivateVector = NULL; maxReset(DeviceId); value = maxReadRegister(DeviceId, REG_02_Master_Configuration_2); value |= BIT_02_SDLE; maxWriteRegister(DeviceId,REG_02_Master_Configuration_2,value); maxInit(DeviceId); maxActivate(DeviceId); /* finished POST so configure for normal operation with defaults */ maxReset(DeviceId); maxInit(DeviceId); maxActivate(DeviceId); 7 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3.3.3 Event Notification Finally a user may need to be notified of an event within the S/UNI-622-MAX. This occurs through the driver function "maxDispatchEvent(..)". For example, the user may wish to be notified that the receive path signal label has changed. The user must first enable the interrupt event as shown here before device activation, or within the "ActivateVector" before the device was activated: /* get the current enables, without clearing status */ /* assume (EXTD=0) in register 0x36 */ maxReadRegister(DeviceId,REG_33_RPOP_Interrupt_Enable,&Value); /* modify the interrupt enable bit */ maxWriteRegister(DeviceId,REG_33_RPOP_Interrupt_Enable,(Value|BIT_33_PSLE)); At some time later when the C2 byte changes the driver's interrupt service routine would dispatch the PSLI interrupt to the "maxDispatchEvent(...)" function which is shown below: void maxDispatchEvent(int DeviceId, int regnum, U8 val) { char msg[MAX_MESSAGE_LENGTH]; DebugMsg(msg,"Device%i: Int reg 0x%02lX = 0x%02lX",DeviceId,regnum,val); } In this driver the event is simply written to the console, but the user would need to port this function to interface to the user's application, via a task communication mechanism provided by the RTOS. In this driver all interrupt events are assumed to have equal priority and are written to the console as they are observed in the interrupt service routine. A user's application would want to prioritize and process these interrupt events. Typically the processed interrupt events would be dispatched for storage in a database of the application. 3.4 Data Structures 3.4.1 tMaxState The driver maintains one device per S/UNI-622-MAX. Operation of a device is maintained via a device data block which is defined in the following sections. The device data block has a state variable that is used to manage the state transitions of the device as shown in figure 2. 8 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX Figure 2. State Diagram of a Device Entry Point posReset(...) Reset posInit(...) posReset(...) posReset(...) Init posActivate(...) Active The states of a device are defined as follows: maxENTRY_POINT: This is the default state when the variable has not yet been assigned by an API call that resets, initializes or activates the device. maxRESET: The device has been reset via software. No other register accesses have been performed after the reset. This state must occur before the device can be initialized and ensures the device is in a known state of operation. Specifically the device is idle while in the RESET state and does not affect operation of the system. maxINIT: The device data block (DDB) holds the initialization of the device and and is passed into the maxInit(...) function to place the device in the initialization state. The registers of the device are initialized but the device does not yet interact with other system components. (ie. the device will not activate the interrupt pin, or otherwise interact with the system.) maxACTIVE: The device data block holds the interrupt enables and other information necessary to allow the device to interact with the system. This information is passed in the function call maxActivate(...) to place the device in the active state. In the active state the S/UNI-622-MAX would be able to activate 9 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX the interrupt pin and interact with the other hardware components of the system. The user must ensure that the processor has assigned an interrupt service routine and has activated other system components as necessary before placing a device in the active state. 3.4.2 maxDDB The device context for the S/UNI-622-MAX is provided in the device data block which has the members shown below. This structure is allocated within the function call maxEntryPoint(...). Member u32 BaseAddress Description Address of the S/UNI-622-MAX in memory space State of this chip device Specifies initialization of chip device. Assigned a NULL value for the chip defaults. Specifies interrupt enables for chip device. Assigned a NULL value for chip defaults (all interrupts disabled). There are 13 interrupt enable registers associated with a channel device. "XXXX" represents the hardware block and "RR" represents the register number. There are 13 interrupt maskable registers associated with a channel device. These specify the interrupt status bits to check within the interrupt service routine. "XXXX" represents the hardware block and "RR" represents the register number. There are 10 counters associated with a device. Here "XXXX" represents the 10 tMaxState State tMaxRegisterValue* InitVector tMaxRegisterValue* ActivateVector u8 XXXXIntEn_RR u8 XXXXIntMask_RR u32 XXXXCount PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX error counter name. 3.5 Application Interface Function Prototypes The API has the following functions that allow the application component to request an action from the driver: 3.5.1 maxEntryPoint Description: This is the first API call that should be made. It allocates and assigns devices for all S/UNI-622-MAX chips in the system. Then it resets, initializes and finally activates the devices. void maxEntryPoint(void) Function Prototype: Function Parameters: none Return Value: maxSUCCESS - all devices have been successfully placed in the active state maxFAILURE - one or more devices could not be activated. Additional Notes: This function is in the porting file "max_p.c" because it needs to be modified for the users environment. 3.5.2 maxExitPoint Description: This function does the reverse of the MaxEntryPoint function. It places all devices in the reset state and then deallocates all device resources. void maxExitPoint(void) Function Prototype: Function Parameters: none Return Value: Additional Notes: none This function is in the porting file "max_p.c" because it needs to be modified for the users environment. 11 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 3.5.3 maxReset Description: Function Prototype: This function performs a software reset of a S/UNI-622MAX device. tMaxStatus maxReset(int DeviceId) Function Parameters: DeviceId - specifies the device data block Return Value: maxSUCCESS - reset completed maxFAILURE - invalid device identifier specified. Additional Notes: none 3.5.4 maxInit Description: Function Prototype: This function initializes the device, but does not enable interrupts. tMaxStatus maxInit(int DeviceId) Function Parameters: DeviceId - specifies the device data block for the device. Return Value: maxSUCCESS - the device has been successfully initialized. maxFAILURE - invalid device ID Additional Notes: The caller must ensure the device data block specifies the initialization values for the device. 3.5.5 maxActivate Description: This function places the device in an active state by enabling device interrupts. 12 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX Function Prototype: tMaxStatus maxActivate(int DeviceId) Function Parameters: DeviceId - specifies the device data block for the device. Return Value: maxSUCCESS - the device has been successfully activated. maxFAILURE - invalid device ID Additional Notes: 3.5.6 maxIsr Description: Function Prototype: This function is the interrupt service routine for the chip device. void maxIsr(int DeviceId) Function Parameters: DeviceId - specifies the device data block for the chip device. Return Value: maxSUCCESS - the interrupt has been processed. maxFAILURE - invalid device ID or no Interrupts were active. Additional Notes: Only the chip device requires an ISR. The channel devices are serviced by the chip's ISR. 3.5.7 maxEnableInterrupts Description: Function Prototype: This function re-enables interrupts for the device while the device is in the ACTIVE state. void maxEnableInterrupts(int DeviceId) Function Parameters: DeviceId - specifies the device data block. 13 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX Return Value: Additional Notes: none This call is only valid in the active state. 3.5.8 maxDisableInterrupts Description: Function Prototype: This function disables interrupts for the device while the device is in the ACTIVE state. void maxDisableInterrupts(int DeviceId) Function Parameters: DeviceId - specifies the device data block for the device. Return Value: Additional Notes: none This call is only valid in the active state. 3.5.9 maxStatistics Description: Function Prototype: This function should be called periodically to accumulate counter statistics. void maxStatistics(int DeviceId) Function Parameters: DeviceId - specifies the device data block for the device. Return Value: Additional Notes: 3.5.10 maxClearCounters Description: Function Prototype: This function clears the accumulated counter values. void maxClearCounters(int DeviceId) none Function Parameters: DeviceId - specifies the device data block for the 14 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX device. Return Value: Additional Notes: 3.5.11 maxReadRegister Description: Function Prototype: This function reads the S/UNI-622-MAX register associated with the device. bool maxReadRegister(int DeviceId, int offset,U8* value) none Function Parameters: DeviceId - specifies the device data block for the device. offset - specifies the register number from the datasheet. value - is a pointer to an 8-bit value which is modified with the value read. Return Value: true - the register was successfully read false - the register could not be read Additional Notes: 3.5.12 maxWriteRegister Description: Function Prototype: This function writes the S/UNI-622-MAX register associated with the device. bool maxWriteRegister(int DeviceId, int offset,U8 value) The device should be in the reset, init or active state when making this call. Function Parameters: DeviceId - specifies the device data block for the device. offset - specifies the register number from the datasheet. 15 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX value - is the 8-bit value to write. Return Value: true - the register was successfully written false - the register could not be written Additional Notes: 3.6 The device should be in the reset, init or active state when making this call. RTOS Interface Function Prototypes The driver requests services from the RTOS which are defined in the following function prototypes: 3.6.1 InstallIsr Description: Function Prototype: This function requests the RTOS to install an interrupt service routine. void InstallIsr(void func(void*),void* context) Function Parameters: func - is the function which is to be called when an interrupt occurs. (ie. maxIsr) context - specifies the context passed as a parameter in the function call. ( ie. the device ID) Return Value: Additional Notes: none 3.6.2 InstallTimer Description: Function Prototype: This function requests the RTOS to periodically call a timer function. void InstallTimer(int msec, (void) *func(int), void* context) 16 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX Function Parameters: msec - is the period of the timer in milliseconds. func - is the function which is to be called periodically. (ie. maxStatistics) context - specifies the context passed as a parameter in the function call. (ie. the device ID) Return Value: Additional Notes: 3.7 S/UNI-622-MAX Interface Function Prototypes The driver uses macros to read and to write the hardware registers. These need to be modified to port the driver to a different environment. The macro definitions are as follows, where "c" is the device data block pointer, "regnum" is the register, and "value" is the 8-bit value written to a register: #define maxWrite(c, regnum, value) (*(U8*)( c->BaseAddress + (regnum) ) = (value)) #define maxRead(c, regnum) (*(U8*)( c->BaseAddress + (regnum) )) none 17 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 4 APPENDIX A. SOURCE CODE Please contact PMC-Sierra to obtain the source code. 18 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 5 REFERENCES [1] PMC-981407, S/UNI-622-MAX Reference Design, PMC-Sierra, Issue 1. [2] PMC-980589, S/UNI-622-MAX Datasheet, PMC-Sierra, Issue 2, August 1998. 19 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX 6 SOFTWARE CUSTOMER FEEDBACK FORM At PMC-Sierra we are always evaluating the ways we support our customers to improve their time-to-market and success in using our products. We encourage you to take the time to fill out the following feedback form and fax it back to the applications group at 604-415-6206. Alternatively you can e-mail the information to apps@pmc-sierra.com . Thank you in advance for you're valuable feedback. Please provide your name, company and contact information below: Name:_______________________________________________________ Company:____________________________________________________ Contact phone and/or e-mail: _____________________________________ SECTION 1. QUESTIONS Please mark your responses to the following questions in the table below: 1. Have you previously used software source code provided for free by other integrated circuit vendors? 2. Has the availability of this software affected your decision to choose PMC-Sierra as a vendor of integrated circuits? 3. Where did you first hear about PMC-Sierra's software driver source code? a) PMC-Sierra Web site (www.pmc-sierra.com) b) Co-workers c) PMC-Sierra Salesperson or Sales Representative d) PMC-Sierra Customer Support Engineer e) Interop trade show f) SATURN conference g) Other (please specify _________________________________) 4. Did this software driver reduce your time-to-market or shorten the learning curve of using a PMC-Sierra integrated circuit? a) Estimated time saved: ________________________________ 5. Do you feel that another vendor of integrated circuits provides better software support for their integrated circuit? If you answered yes then please specify the vendor, the product, and the software support the vendor provided Yes Yes No No Yes No Yes No 20 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX below. ________________________________ ________________________________ SECTION 2. RATING Please rate this software source code in the following areas: (1 = outstanding, 2 = exceeded expectations, 3 = met expectations, 4 = inadequate, 5 = poor) RATING Document: Readability Targeted to audience Usefulness Completeness Detailed Accuracy Application Programmers' Interface (API): Completeness Usability Source Code: Structure Style Usefulness Completeness Portability Accuracy Overall Rating: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 SECTION 3. COMMENTS Please comment on any areas where you feel PMC-Sierra could improve the software support and software documentation for this product: 21 PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMERS' INTERNAL USE PM5356 S/UNI-622-MAX APPLICATION NOTE PMC-981297 ISSUE 1 SOFTWARE DRIVER FOR THE S/UNI-622-MAX CONTACTING PMC-SIERRA, INC. PMC-Sierra, Inc. 105-8555 Baxter Place Burnaby, BC Canada V5A 4V7 Tel: Fax: (604) 415-6000 (604) 415-6200 document@pmc-sierra.com info@pmc-sierra.com apps@pmc-sierra.com http://www.pmc-sierra.com Document Information: Corporate Information: Application Information: Web Site: None of the information contained in this document constitutes an express or implied warranty by PMC-Sierra, Inc. as to the sufficiency, fitness or suitability for a particular purpose of any such information or the fitness, or suitability for a particular purpose, merchantability, performance, compatibility with other parts or systems, of any of the products of PMC-Sierra, Inc., or any portion thereof, referred to in this document. PMC-Sierra, Inc. expressly disclaims all representations and warranties of any kind regarding the contents or use of the information, including, but not limited to, express and implied warranties of accuracy, completeness, merchantability, fitness for a particular use, or non-infringement. In no event will PMC-Sierra, Inc. be liable for any direct, indirect, special, incidental or consequential damages, including, but not limited to, lost profits, lost business or lost data resulting from any use of or reliance upon the information, whether or not PMC-Sierra, Inc. has been advised of the possibility of such damage. (c) 1999 PMC-Sierra, Inc. PM-981296 (R1) PMC-Sierra, Inc. 105 - 8555 Baxter Place Burnaby, BC Canada V5A 4V7 604 .415.6000 |
Price & Availability of 1981297
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |