module ti.sysbios.family.arm.ducati.dm8148.IntMux

IntMux Module

Below is an example of how to override the default mapping of interrupt 42 so that it is sourced by I2CINT2 rather than its default mapping to I2CINT1: [ more ... ]
C synopsis target-domain sourced in ti/sysbios/family/arm/ducati/dm8148/IntMux.xdc
DETAILS
Below is an example of how to override the default mapping of interrupt 42 so that it is sourced by I2CINT2 rather than its default mapping to I2CINT1:
  #include <ti/sysbios/family/arm/m3/Hwi.h>
  #include <ti/sysbios/family/arm/ducati/dm8148/IntMux.h>
  
  Void myI2CINT2Handler(UArg arg)
  {
      System_printf("I2CINT2 arg = %d\n", (UInt)arg);
  }
  
  Int main(Int argc, Char* argv[])
  {
      Hwi_Params params;
  
      Hwi_Params_init(&params);

      // set IntMux 19 to event number 4 (I2CINT2)
      IntMux_setEvent(19, 4);
  
      // create a corresponding interrupt handler
      // notice that Ducati interrupt number 42 corresponds to IntMux 19

      params.arg = 42; // pass the Int number to the handler for demo 

      Hwi_create(42, myI2CINT2Handler, &params, NULL);
  
      BIOS_start();
  
      return (0);
  }
Here is how you would define the same interrupt handler statically in a configuration script:
  var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
  var IntMux = xdc.useModule('ti.sysbios.family.arm.ducati.dm8148.IntMux');
  
  IntMux.setEventMeta(19, 4);
  
  var hwiParams = new Hwi.Params();
  hwiParams.arg = 42;
  Program.global.staticHwi = Hwi.create(42, '&myI2CINT2Handler', hwiParams);

Calling Context

Function Hwi Swi Task Main Startup
setEvent Y Y Y Y Y
Definitions:
  • Hwi: API is callable from a Hwi thread.
  • Swi: API is callable from a Swi thread.
  • Task: API is callable from a Task thread.
  • Main: API is callable during any of these phases:
    • In your module startup after this module is started (e.g. Mod_Module_startupDone() returns TRUE).
    • During xdc.runtime.Startup.lastFxns.
    • During main().
    • During BIOS.startupFxns.
  • Startup: API is callable during any of these phases:
    • During xdc.runtime.Startup.firstFxns.
    • In your module startup before this module is started (e.g. Mod_Module_startupDone() returns FALSE).
 
config IntMux_A_badEventNum  // module-wide

Assert if event number > 47

C synopsis target-domain
extern const Assert_Id IntMux_A_badEventNum;
 
 
config IntMux_A_badIntNum  // module-wide

Assert if interrupt number > 56

C synopsis target-domain
extern const Assert_Id IntMux_A_badIntNum;
 
 
config IntMux_intMuxBaseAddr  // module-wide

Address of "DUCATI_INTMUX_0_3" register

C synopsis target-domain
extern const Ptr IntMux_intMuxBaseAddr;
 
 
IntMux_setEvent()  // module-wide

Set the event number associated with an interrupt

C synopsis target-domain
Void IntMux_setEvent(UInt intMuxNum, UInt eventNum);
 
ARGUMENTS
intNum — The intMux number (0-56)
eventNum — The event number (0-47)
DETAILS
Dynamically sets the event number associated with an interrupt in the Ducati Interrupt Mux as described in section 5.9.2 of the Centaurus Architecture Spec.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId IntMux_Module_id();
// Get this module's unique id
 
Bool IntMux_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle IntMux_Module_heap();
// The heap from which this module allocates memory
 
Bool IntMux_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 IntMux_Module_getMask();
// Returns the diagnostics mask for this module
 
Void IntMux_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/sysbios/family/arm/ducati/dm8148/IntMux.xdc
var IntMux = xdc.useModule('ti.sysbios.family.arm.ducati.dm8148.IntMux');
module-wide config parameters
        msg: "A_badIntNum: eventNum must be <= 47"
    };
        msg: "A_badIntNum: intNum must be <= 56"
    };
 
module-wide functions
    IntMux.setEventMeta// Set the event number associated with an interrupt(UInt intMuxNum, UInt eventNum) returns Void
 
 
config IntMux.A_badEventNum  // module-wide

Assert if event number > 47

Configuration settings
IntMux.A_badEventNum = Assert.Desc {
    msg: "A_badIntNum: eventNum must be <= 47"
};
 
C SYNOPSIS
 
config IntMux.A_badIntNum  // module-wide

Assert if interrupt number > 56

Configuration settings
IntMux.A_badIntNum = Assert.Desc {
    msg: "A_badIntNum: intNum must be <= 56"
};
 
C SYNOPSIS
 
config IntMux.intMuxBaseAddr  // module-wide

Address of "DUCATI_INTMUX_0_3" register

Configuration settings
IntMux.intMuxBaseAddr = Ptr 0x48140F54;
 
C SYNOPSIS
 
metaonly config IntMux.common$  // module-wide

Common module configuration parameters

Configuration settings
IntMux.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly IntMux.setEventMeta()  // module-wide

Set the event number associated with an interrupt

Configuration settings
IntMux.setEventMeta(UInt intMuxNum, UInt eventNum) returns Void
 
ARGUMENTS
intNum — The intMux number (0-56)
eventNum — The event number (0-47)
DETAILS
Statically sets the event number associated with an interrupt in the Ducati Interrupt Mux as described in section 5.9.2 of the Centaurus Architecture Spec.
generated on Tue, 14 Feb 2017 19:59:28 GMT