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.

Bug with TI example header file: "DSP2833x_SWPrioritizedIsrLevels.h" ?

Hello there,

I have been experimenting with changing interrupt priorities in software using the TI example files. I am concerned that there might be bug(s) with the interrupt priority calculations in "DSP2833x_SWPrioritizedIsrLevels.h". My observations are as follows:

1.  I modified part of the DSP2833x_SWPrioritizedIsrLevels.h header file that assigns the interrupt priorities within a PIE group to the following:

#define	G11PL       1        // SEQ1INT     (ADC)
#define	G12PL       2        // SEQ2INT     (ADC)
#define	G13PL       0        // reserved
#define	G14PL       5        // XINT1       (External)
#define	G15PL       2        // XINT2       (External)
#define	G16PL       6        // ADCINT      (ADC)
#define	G17PL       7        // TINT0       (CPU Timer 0)
#define	G18PL       8        // WAKEINT     (WD/LPM)

In the Watchwindow, the ISRTrace table (which keeps track of the order in which the ISRs are serviced), I see that the order of servicing the ISRs is as follows:

[0]	unsigned int	0x0011 (Hex)
[1]	unsigned int	0x0012 (Hex)
[2]	unsigned int	0x0014 (Hex)
[3]	unsigned int	0x0015 (Hex)	
[4]	unsigned int	0x0016 (Hex)	
[5]	unsigned int	0x0017 (Hex)
[6]	unsigned int	0x0018 (Hex)

The table above indicates that Xint1 is serviced before Xint2. I expected the opposite because Xint2 interrupt priority is higher than that of Xint1 (from the modified header file) i.e. 0x0014 then 0x0012 instead of the opposite.

2. I get expected results if I change the priority of Xint2 to '1' i.e. 0x0012 then 0x0014.

3. There are many other combinations of priority ordering that work and others that don't. I just can't list them all.

So, I wonder if anyone has come across this problem before and if they can reproduce what I just described here. Any suggestions?

Oh, and also, I couldn't initially build the project. I kept getting the error:

error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section ".text" size 0x10f5 page 0

To solve the problem, I replaced one of the linkers from "28335_RAM_Ink.cmd" to "F28335.cmd". It takes more time to build the project, but it actually builds without any errors.

I'd appreciate any feedback on any of these issues.

Thanks in advance for your help.