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.

Interrupt questions for 8148

Hi,

I have a couple of interrupt related questions

 

#1

I'm migrating from Bios5 and have a masking question.  The Sys Bios API documentation has a description (below).

It says that "Only a few targets/devices truly support this masking option. For those that don't, this setting is treated the same as MaskingOption_SELF."

I'm assuming that these choices are valid for 8148?   Also, if you choose " Hwi_MaskingOption_BITMASK,"  Where does the mask go, or does it set like this? hwiParams.maskSetting = 0x00000001;  ?   In general, I'm expecting nesting to be possible through this mechanism, correct?

#2

Is the function Hwi_enableInterrupt() identical to setting the IER register?

 

Thanks,
Matt

 

 

enum Hwi_MaskingOption

Shorthand interrupt masking options

C synopsis target-domain

typedef enum Hwi_MaskingOption {
    Hwi_MaskingOption_NONE,
    Hwi_MaskingOption_ALL,
    Hwi_MaskingOption_SELF,
    Hwi_MaskingOption_BITMASK,
    Hwi_MaskingOption_LOWER
} Hwi_MaskingOption;

 

VALUES

MaskingOption_NONE — No interrupts are disabled

MaskingOption_ALL — All interrupts are disabled

MaskingOption_SELF — Only this interrupt is disabled

MaskingOption_BITMASK — User supplies interrupt enable masks

MaskingOption_LOWER — All current and lower priority interrupts are disabled.

Only a few targets/devices truly support this masking option. For those that don't, this setting is treated the same as MaskingOption_SELF.
  • Hi Matt --

    You have it right.  The MaskingOption_BITMASK allows you to specify IER register mask in the params.maskSetting.

    Hwi_enableInterrupt just sets the IER.

    While it's no excuse for missing documentation, you can also see  the source for the Hwi interrupt module in <biosinstalldir>/ti/sybios/family/c64p/Hwi.c.


    /*
     *  ======== Hwi_enableInterrupt ========
     */
    UInt Hwi_enableInterrupt(UInt intNum)
    {
        return (Hwi_enableIER(1 << intNum));
    }

    -Karl-