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.

Zero-Latency Interrupt on a 28335

Other Parts Discussed in Thread: SYSBIOS

I'm trying to get a zero-latency interrupt working on my 28335 device, but I think I'm having some trouble.

So far, I've taken the following steps to get a working program with an ADC interrupt, working as fast as possible.

1. changed the generic HWI module to the device specific module by changing, in the cfg script, the line

var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');

to

var Hwi = xdc.useModule(ti.sysbios.family.c28.Hwi');

2. Commenting out:

Program.global.ADC = Hwi.create(37,"&ADC_ISR", hwi0Params);

and

Program.global.Fault = Hwi.create(35,"&FAULT_ISR", hwi1Params);

3. adding the line

Hwi.zeroLatencyIERMask = 1;

4. Adding "interrupt" to:

interrupt void ADC_ISR (void)

and

interrupt void FAULT_ISR (void)

5. Adding to my adc and gpio configuration scripts:

Hwi_plug(37, (Hwi_PlugFuncPtr) ADC_ISR);

PieCtrlRegs.PIEIER1.bit.INTx6 = 1; (this was already included in both becuase it was left over legacy code)

IER |= 0x0001; (also left over legacy code)

and

Hwi_plug(35, (Hwi_PlugFuncPtr) FAULT_ISR);

PieCtrlRegs.PIEIER1.bit.INTx4 = 1; (left over legacy coode)

And since this was a converted program from DSPBIOS, there was already an acknowledgement in the ISRs:

PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; (left over legacy code)

 

Now, when I run the program, it will execute for around 5 seconds and everything will reset, continually.  If I just undo those changes, the program runs for as long as I can stand to watch it.  I am operating the ADC interrupt at 12kHz, because that's as fast as it will run without pulling it out of the dispatcher.

Is there a step I missed to make this interrupt work correctly?  I've even attempted the comment out and not include the FAULT_ISR in the configuration, but the result is the same.