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.

AM2634-Q1: How to use VIM_IRQPRIMSK Register to disable IRQs of a particular priority?

Part Number: AM2634-Q1

Hi, experts,

My customer wants to mask IRQs of some priorities, and he finds VIM_IRQPRIMSK register in AM263x Register Addendum (spruj42c).

But I find both VIM_IRQPRIMSK and VIM_FIQPRIMSK are not included in .h files, corresponding register addresses are marked as reserved.

Customers have tested by setting VIM_IRQPRIMSK register but did not get expected behavior. For example, they set VIM_IRQPRIMSK to 0x07 to only enable ISRs with priorities of 0/1/2, and mask other ISRs with lower priorities. With this VIM_IRQPRIMSK setting, even ISRs with priorities of 0/1/2 were not triggered. They also tried to set VIM_IRQPRIMSK to 0xFFFF to enable ISRs of all priorities, but no ISRs were tried. 

In customers' use case, they need to mask particular priorities in application code, so please help to guide the way to disable IRQs of a particular priority. Thanks.

  • Hi Fan,

    The priority based interrupt enable/disable features have not been implemented in MCU+ SDK. AT this point, only HwiP_enableInt() and HwiP_disableInt() are available to do the interrupt enable/disable by interrupt number. The only way to implement  priority based interrupt enable/disable features is to write their own function which uses the HwiP_enableInt() and HwiP_disableInt().

    Best regards,

    Ming

  • Hi, Ming,

    Thanks for the infomation.

    Customers are targeting to use this priority based interrupt mask feature with AUTOSAR environment. Could you please help to give some guidance in implementing it by their own functions?

    Thanks.

  • Hi, Ming,

    Meanwhile, how to make use of VIM_IRQPRIMSK register to implement priority base interrupt mask feature?

    Thanks.

  • Hi Fan,

    The most straight forward method is that they keep a list of interrupts for each possible priority level. Whenever the request to enable/disable request for a priority level comes up, the custom function will enable/disable all the interrupts in the list corresponding that priority level.

    To make use of VIM_IRQPRIMSK register to implement priority base interrupt mask feature is a new feature yet to be implemented. I can file a JIRA ticket, but the software team will make the priority call to decide when it will be implemented.

    Best regards,

    Ming

  • Hi, Ming,

    Thanks.