Notify Module Overview

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Overview

The NOTIFY module abstracts physical interrupts into multiple logical events. It provides a simple and quick method of sending 32-bit message.

Availability

The NOTIFY module is available in DSPLink releases from 1.40.03 onwards.

Features


Usage

Header files

The header file to be included for using NOTIFY module on both GPP and DSP-side is notify.h

#include <notify.h>

Dependencies

Configuration

The NOTIFY module is configured through the DSPLink dynamic configuration file $(DSPLINK)/config/all/CFG_<PLATFORM>.c

Example

NOTIFY module configuration in file $(DSPLINK)/config/all/CFG_Davinci_DM6446.c from DSPLink 1.51 release is given below.

/** ============================================================================
 *  @name   LINKCFG_ipsTable_00
 *
 *  @desc   IPS table ID 0.
 *  ============================================================================
 */
STATIC LINKCFG_Ips  LINKCFG_ipsTable_00 [] =
{
    {
        "IPS",                 /* NAME           : Name of the Inter-Processor-Signaling component */
        (Uint32) 32,           /* NUMIPSEVENTS   : Number of IPS events to be supported */
        (Uint32) 0,            /* MEMENTRY       : Memory entry ID (-1 if not needed) */
        (Uint32) 46,           /* GPPINTID       : Interrupt no. to used by the IPS on GPP-side. (-1 if uni-directional to DSP) */
        (Uint32) 16,           /* DSPINTID       : Interrupt no. to used by the IPS on DSP-side. (-1 if uni-directional to GPP) */
        (Uint32) 4,            /* DSPINTVECTORID : Interrupt vector no. to used by the IPS on DSP-side. (-1 if uni-directional to GPP) */
        (Uint32) 50000000,     /* ARGUMENT1      : Poll value for which IPS waits while sending event (-1 if infinite) */
        0                      /* ARGUMENT2      : Second IPS-specific argument */
    },
    {
        "IPS",                 /* NAME           : Name of the Inter-Processor-Signaling component */
        (Uint32) 32,           /* MAXIPSEVENTS   : Number of IPS events to be supported */
        (Uint32) 1,            /* MEMENTRY       : Memory entry ID (-1 if not needed) */
        (Uint32) 47,           /* GPPINTID       : Interrupt no. to used by the IPS on GPP-side. (-1 if uni-directional to DSP) */
        (Uint32) 17,           /* DSPINTID       : Interrupt no. to used by the IPS on DSP-side. (-1 if uni-directional to GPP) */
        (Uint32) 5,            /* DSPINTVECTORID : Interrupt vector no. to used by the IPS on DSP-side. (-1 if uni-directional to GPP) */
        (Uint32) 50000000,     /* ARGUMENT1      : Poll value for which IPS waits while sending event (-1 if infinite) */
        0                      /* ARGUMENT2      : Second IPS-specific argument */
    }
} ;

Explanation

Each IPS instance provides information and configuration for one ARM<->DSP interrupt pair (in both directions).
The notable fields that may be modified by the user are:

The index of the IPS instance indicates its ID. This ID needs to be used for the ipsId parameter when using the NOTIFY APIs.

Usage

For sending events from DSP->GPP

status = NOTIFY_register (ID_PROCESSOR, /* Processor ID to talk with. */
                          0,            /* IPS ID to be used */
                          5,            /* IPS event number. Choose any unused number */
                          myFxn,        /* Callback function for debugging */
                          myArg) ;      /* Parameter (if any) for callback function */
Void myFxn (Uint32 eventNo, Pvoid arg, Pvoid info)
   {
       /* Print that callback is received. */
       printf ("In notify callback eventNo [%d], arg [%d], info [%d]\n",
               eventNo,
               arg,
               info) ;
       /* Do some processing */
   }
status = NOTIFY_notify (ID_GPP, /* Processor ID to send notification to. */
                        0,      /* IPS ID to be used */
                        5,      /* IPS event number. Choose any unused number. */
                        info) ; /* 32-bit information to be sent across */

For sending events from GPP->DSP

status = NOTIFY_register (ID_GPP, /* Processor ID to talk with. */
                          0,            /* IPS ID to be used */
                          5,            /* IPS event number. Choose any unused number */
                          myFxn,        /* Callback function for debugging */
                          myArg) ;      /* Parameter (if any) for callback function */) ;
Void myFxn (Uint32 eventNo, Void * arg, Void * info)
   {
       /* Do some processing */
   }
status = NOTIFY_notify (ID_PROCESSOR, /* Processor ID to send notification to. */
                        0,            /* IPS ID to be used */
                        5,            /* IPS event number. Choose any unused number. */
                        info) ;       /* 32-bit information to be sent across */
Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox