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.

NDK Hardware Interrupt mask settings

Other Parts Discussed in Thread: SYSBIOS

SYSBIOS = 6.34.2.18

NDK = 2.22.0.06

DSP = C6748

The EMAC interrupts are setup from a function called:  Interrupt_init().  This function is located inside ethdriver.c.  Within the this function, it configures a structure and then passes that into Interrupt_add().  Interrupt_add() does the dirty work of actually dynamically creating the HWI ISR via the SYSBIOS call:  Hwi_create().

OK, here is the question:  How do you configure the interrupt mask (NONE, ALL, SELF, BITMASK, LOWER)?

It appears the structure that is passed into Interrupt_add() doesn't allow for a masking option.  Following the code into Interrupt_add(), I can see it is forcing SELF as the masking option before calling Hwi_create().

- Dean

  • Dean,

    Yes, typically this is done in the params structure that you pass into the Hwi_create() call.

    If you can't pass change the params to the Hwi_create call then you will get the default which is "MaskingOption_SELF"

    Judah

  • So the NDK designers decided that SYSBIOS would be required, but didn't build into the API enough logic to fully control everything?

    If SELF isn't what I want for the NDK interrupts, I see the following work around.  Modify Interrupt_add() to force whatever mask option I want.  This has the side effect of having to do this every time I update the NDK.  This looks like a sure fire setup to screw me 6 months down the road (or whenever the next NDK gets released).  Do you see any other options?

    Thanks, Dean

  • Dean,

    Typically someone building on top of BIOS is not going to support every configuration that BIOS allows.  They will typically decide certain configurations.

    Why is it that you don't want SELF which is generally what most people do?  Is it a problem in your system?

    I think your options are:
    #1.  Do what you suggested above
    #2.  Is it possible that you can create the Hwi in your source code?  Either by not calling the function that creates the Hwi in the NDK or if its going to get called, you can call delete of the Hwi and re-create it with the params you want.

    Judah

  • Building off your #2 suggestion, I think I have a better solution that offers many benefits.

    1.  Comment out the code in ethdriver.c that dynamically creates the NDK interrupts.  This involves commenting out the Interrupt_init() call from the HwPktOpen() function.

    2.  Statically create the two HWI's needed for the NDK using the SYSBIOS app.cfg file.  By doing this statically, I can now easily change the masking option and interrupt number.  I can get the rest of the information to statically create the interrupts by looking at the commented out Interrupt_init() code.

    3.  Because I've modified ethdriver.c (which is not a NDK file), whenever I update to a new NDK version, things should just work.  However, since ethdriver.c comes from the NSP, if that ever gets updated, I'll have to remember to modify ethdriver.c again.  Updating the NSP files is more of manual process anyway, so hopefully I'll catch it in the future.

    4.  Now that the NDK's interrupts are listed in the C6x/Hwi tab, everything in my system is defined in one place.  We'll almost everything.  I'm still confused on how a Timer HWI gets created to drive the CLOCK functions, but I'll save that for another thread discussion.

    If you see anything wrong with my logic, please let me know.  Thanks for your help.

    - Dean