PM5358
Software Architecture
Calling suni4x622DPR
The sysSuni4x622DPRTask function is a system specific function that runs as a separate task within the RTOS. You should set the DPR task’s priority higher than the application task(s) interacting with the
Then suni4x622DPR processes the status information and takes appropriate action based on the specific interrupt condition detected. The nature of this processing can differ from system to system. Therefore, suni4x622DPR calls different indication callbacks for different interrupt conditions.
Typically, you should implement these callback functions as simple message posting functions that post messages to an application task. However, you can implement the indication callback to perform processing within the DPR task context and return without sending any messages. In this case, ensure that this callback function does not call any API functions that would change the driver’s state, such as suni4x622Delete. Also, ensure that the callback function is
Note: Since the suni4x622ISR and suni4x622DPR routines themselves do not specify a communication mechanism, you have full flexibility in choosing a communication mechanism between the two. A convenient way to implement this communication mechanism is to use a message queue, which is a service that most RTOSs provide.
You must implement the two system specific functions, sysSuni4x622ISRHandler and
sysSuni4x622DPRTask. When the driver calls sysSuni4x622ISRHandlerInstall, the application installs sysSuni4x622ISRHandler in the interrupt vector table of the processor, and the sysSuni4x622DPRTask function is spawned as a task by the application. The sysSuni4x622ISRHandlerInstall function also creates the communication channel between sysSuni4x622ISRHandler and sysSuni4x622DPRTask. This communication channel is most commonly a message queue associated with the sysSuni4x622DPRTask.
Similarly, during removal of interrupts, the driver removes sysSuni4x622ISRHandler from the microprocessor’s interrupt vector table and deletes the task associated with
sysSuni4x622DPRTask.
As a reference, this manual provides example implementations of the interrupt installation and removal functions on pages 109 and 111. You can customize these prototypes to suit your specific needs.
Calling suni4x622Poll
Instead of using an interrupt service model, you can use a polling service model in the S/UNI- 4x622 driver to process the device’s
Figure 7 illustrates the polling service model used in the S/UNI-4x622 driver design.
Proprietary and Confidential to | 24 |
Document ID: |
|