This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A few questions about interruptions

Other Parts Discussed in Thread: SYSBIOS

Hello all,

I'm doing some preliminary work on interruptions for the DSP C6678.
As I read the documentation (user guides, wiki, chm doc) I run into some questions :

- when you say "host" does it mean the DSP (all 8 cores) or the corepac (1 core) ?
- what does the acronym GEM mean ?

I have identified 4 ways to disable/restore interruptions on a single core, which are :
1) assembly (DINT, RINT)
2) intrinsics (_disable_interrupts, ...)
3) CSL (CSL_intcGlobalDisable, ...)
4) Sysbios HWI (Hwi_disable, ...)

For the DSP level (all 8 cores at once) would it work using :
a) CSL : CSL_CPINTC_enableAllHostInterrupt(cphnd);
or b) Sysbios : CpIntc_disableAllHostInts(UInt id);?

If I disable the 4 CICs then I won't get any events/interruptions right ? (for all cores I mean)
Is there any simpler way ?

Thank you,
Clément

  • Host, is the particular Host (CorePac#, ARM_CorePac#) the Chip Interrupt Controller (CIC) feeds into multiple Hosts.

    GEM stands for Generalized Embedded Megamodule - It's a term that was used in the C64x+ devices, it's equivalent to the CorePac on C66x devices.  It's basically the Core + Associated Memory and HW that is local to the core as opposed to being shared across the devices (some items like Local Memories are accessible outside the core but only with Global Addressing.)

    The call for the 'Enable ALL Host / Disable All Host' is enabling or disabling all the GIE (Global Interrupt Enable Register)  for each of the cores.  It does not change any of the CIC configurations when doing so.

    Best Regards,

    Chad

  • Thank you Chad,

    it answers my question.

  • Chad,

    Other precision : With SYSBIOS all Global Enable Registers are enabled by default (1).
    Let's say I want to disable it statically with the config file (cfg).

    I would use

    var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
    var obj = new CpIntc.RegisterMap;
    obj.GER = (UInt32) 0;

    but will it disable all four CIC ? (CIC0 to CIC4)
    what if I want to only disable CIC0 and CIC1 ?

    Thank you, Clément

  • This isn't a command to disable CIC's, it's a command to disable the Global Enable's of the Hosts (the CorePacs.)  It's irrelevant of the CIC's.

    Maybe you're meaning to ask what if I don't want to disable/enable specific hosts.  This can be achieved via the Host Interrupt Enable Register.

    Best Regards,
    Chad 


  • I'm a bit confused.

    My understanding
    a) if I set the GER of CIC0 and CIC1 to 0, I disable interrupts for cores 0 to 7.
    b) I can also acheive the same thing by setting for each corepac the GIE bit to 0 (for example with DINT).

    but you're telling me that when I do
    "obj.GER = (UInt32) 0; "
    in fact it's taking each corepac GER and setting them to 0. Then I got "a)" wrong

    At runtime if I do
    CpIntc_disableAllHostInts(0);
    CpIntc_disableAllHostInts(1);
    EDIT
    I'm then only disabling interrupts for CpINTC (CIC) 0 and 1, hence Corepacs 0 to 7.

    In the function below id = CpINTC (CIC).
    Void CpIntc_disableAllHostInts(UInt id) {
    CpIntc_module->controller[id]->GER = 0; }

    But

    what I still don't get is: which CpINTC the config below is affecting ?
    All 4 CpINTC ??

    "obj.GER = (UInt32) 0; "

    Interrupt topology for reference
    (http://processors.wiki.ti.com/index.php/File:Interrupt_Topology_6678.JPG)

  • More evidence

    Int CpIntc_Module_startup(Int phase)
    {
        UInt32 id = 0;
        extern volatile cregister UInt32 DNUM;

        /* for core# 4-7 use INTC1 otherwise use INTC0 */
        if (DNUM > 3) {
            id = 1;
        }
    (...)
    /* Globally enable all host interrupts */
        CpIntc_enableAllHostInts(id);
    }

    That means that :
    CpIntc_enableAllHostInts(0); // disables interrupts for Cores 0, 1, 2, 3   (CpINTC 0)

    CpIntc_enableAllHostInts(1); // disables interrupts for Cores 4, 5, 6, 7   (CpINTC 1)

    what I still don't get is: which CpINTC the config below is affecting ?
    All 4 CpINTC ??

    "obj.GER = (UInt32) 0; "

  • Quick recap : my unanswered question is :

    When I use

    var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
    var obj = new CpIntc.RegisterMap;
    obj.GER = (UInt32) 0;

    in a SYSBIOS config file
    Which CpINTC is affected ?

    (There are 4 CpINTC in the C6678)

    Thanks,
    CM