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.

PROCESSOR-SDK-AM62X: Interrupts cannot be disabled by calling HwiP_disable()

Part Number: PROCESSOR-SDK-AM62X


Calling HwiP_disable() disables interrupts with priority 7, but interrupts with priority 0-6 are still generated.

I want to disable all priority interrupts.

The document says “Disable all interrupts.” but not this API?

Priority refers to the argument HwiP_Params.priority of HwiP_construct().

environment

- CCS:12.6.0.00008 

- AM62x MCU+ SDK :09.02.00.38

- Board:SK_AM62

- Core:M4F

  • Hello,

    Thanks for reaching out to Texas Instruments E2E support forum.

    I have taken your inputs and working on it. Please allow some time to revert back.

    Regards,

    Tushar

  • Hello, 

    Thanks for your patience.

    I am able to replicate the issue at my end and able to find the root cause for it.

    The HwiP_disable() API is internally calling the _set_interrupt_priority() API which disable all the interrupt with urgency lower than a certain level and leave the higher-urgency interrupts not disabled at all for M4F core.

    In HwiP_disable API for M4F core is calling the API in below specified manner which is only disabling the interrupt having priority less than or equal to 7.

    _set_interrupt_priority((7U) << (HwiP_NVIC_PRI_SHIFT))

    Please update the HwiP_disable API with below code.

    uintptr_t HWI_SECTION HwiP_disable(void)
    {
        return (uintptr_t)_set_interrupt_priority((1U) << (HwiP_NVIC_PRI_SHIFT));
    }

    The API will be found at ${MCU+SDK}\source\kernel\nortos\dpl\m4\HwiP_armv7m.c file. After updating the file with above mentioned changes rebuild the libraries.

    Run the below command from ${MCU+SDK}\source\kernel\nortos directory.

    • Clean the library.

    gmake -f makefile.am62x.m4f.ti-arm-clang PROFILE=debug clean
    gmake -f makefile.am62x.m4f.ti-arm-clang PROFILE=release clean

    • Rebuild the library.

    gmake -f makefile.am62x.m4f.ti-arm-clang PROFILE=debug
    gmake -f makefile.am62x.m4f.ti-arm-clang PROFILE=release

    Rebuild the application.

    After performing the above mentioned steps you will be able to disable all the interrupts expect the interrupt which has priority 0.

    Regards,

    Tushar

  • That allowed me to disable the interruptions.
    Thanks for your help.

  • Hello,

    Thanks for your confirmation.

    Happy to help Slight smile

    Regards,

    Tushar