PMC-Sierra PM5358 S/UNI 4x622 Power Screwdriver User Manual


 
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Proprietary and Confidential to PMC-Sierra, Inc. 22
Document ID: PMC-2010419, Issue 1
Figure 5: Device Management Flow Diagram
De-activates the device and removes it from normal operation.
This involves disabling the device interrupts. ISR routines for this
device are removed
usingsysSuni4x622ISRHandlerRemove
when the module is closed.
Applies a software reset to the device to put it in its default startup
state.
Removes the device from the list of devices being controlled by the
S/UNI-4x622 driver. This function de-allocates the device context
information for the device being deleted.
In order to re-initialize the device, reset the device using
suni4x622Reset
and go through the initialization sequence
again.
Prepares the device for normal operation by enabling interrupts and
other global enables. ISR routines are installed when the module is
started using
sysSuni4x622ISRHandlerInstall
. The device is now
operational and all other API can be invoked.
Applies a reset to the device and initializes the device registers
and associated RAMs based on the DIV passed by the user. The
user may only pass a profile number, which corresponds to a
previously saved & validated set of configurations (by using
suni4x622AddInitProfile
)
Detects the new device in hardware, assigns a DDB to the new device
andstores the user's context for the device. Returns a device handle to
the user
suni4x622Init
suni4x622Add
suni4x622Activate
suni4x622Reset
suni4x622DeActivate
suni4x622Reset
suni4x622Delete
END
START
2.5 Interrupt Servicing
The S/UNI-4x622 driver services device interrupts using an Interrupt-Service Routine (ISR) that
traps interrupts, and a Deferred-Processing Routine (DPR) that actually processes the interrupt
conditions and clears them. This lets the ISR execute quickly and exit. Most of the
time-consuming processing of the interrupt conditions is deferred to the DPR by queuing the
necessary interrupt-context information to the DPR task. The DPR function runs in the context of
a separate task within the RTOS.
Note: Since the DPR task processes potentially serious interrupt conditions, you should set the
DPR task’s priority higher than the application task interacting with the S/UNI-4x622 driver.