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.

RTOS/TM4C1294NCPDT: Accessing Sub-priority group of Hardware Intrrupt

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi,

I need to set the sub-priority of HWIs of same priority group.

As per the datasheet of device, section 2.5.6 (page 120), it says that sub-priority of interrupts can be adjusted (if we reduce priority groups using APINT register).

How can we access and set this using XDC config tool of Hwi ?

I referred TI RTOS user guide and also SYS/BIOS Kernel user guide to find this, but in vain.

Pls help.

Thanks and Regards,

Pranav. 

  • You can combine the priority groups into sub-groups with the TivaWare function IntPriorityGroupingSet(). This simply changes how interrupts can preempt each other. You can break the 8 priority groups into 4 groups each with two sub-groups, 2 groups each with 4 sub-groups, or 1 group with 8 sub-groups. An interrupt with a lower group number will preempt an interrupt handler with a higher group number. An interrupt with the same group number, but a lower sub-group number will not preempt an interrupt with the same group number. However, if two interrupts are pending with the same group number and different sub-group numbers, the one with the lower sub-group number will be serviced first even if it has a higher exception number. Is this what you are trying to accomplish?
  • Hi Bob,

    Thanks for your reply.
    Yes, it is exactly the same thing i am looking for (described in section 2.5.6 as i said).

    As i understand, i can accomplish this as follows:

    First, call TivaWare function IntPriorityGroupingSet(2) in my hdwr_Init () function call; (i need to have 2 sub-group)
    Second, define priority in each Hwi instance (XDC Tool) in line with guideline in Table 3-9 of device datasheet.

    Moreover, wherever possible, i can also take advantage of inherent interrupt priority based on exception no. of each hw interrupt. (as defined in table 2-9 of device datasheet). The behavior is similar to that of interrupts in same sub-groups (if they are in same priority group).

    I hope my understanding is correct.


    BR,
    Pranav.
  • Hi Pranav,

    That function is a bit confusing. try:

     IntPriorityGroupingSet(NVIC_APINT_PRIGROUP_2_6); 

    Looking at the definition of the APINT register we want a 101b in bits 10:8.

    #define NVIC_APINT_PRIGROUP_2_6 0x00000500  // Priority group 2.6 split
    

  • Thanks Bob for clarity.