Reply by Bartek March 1, 20072007-03-01
>Did you enable PIE unit (by calling InitPieCtrl())
I enable PIE in my own functions, and I think it's OK. However I inserted: InitPieCtrl() then EnableInterrupt() for testing and it's no better. During debug ENPIE=1. What I have now noticed is that when I manually set the interrupt flag and cycle step the PIECTRL is first set to D4D => TINT0_ISR), then it is set to 0x0D27 => illegal operation. This is a stripped version of my program that still has this problem: -----test.c---- #include "DSP281x_Device.h" interrupt void CpuTimer0ReachZeroIsr(void) { PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; } void main(void) { DINT; InitPieVectTable(); CpuTimer0Regs.TCR.bit.FREE = 1; CpuTimer0Regs.PRD.all = 100; CpuTimer0Regs.TCR.bit.TRB = 1; CpuTimer0Regs.TCR.bit.TIE = 1; EALLOW; PieVectTable.TINT0 = &CpuTimer0ReachZeroIsr; EDIS; PieCtrlRegs.PIEIER1.bit.INTx7 = 1; IER |= M_INT1|M_INT2; EINT; while(1); }
Reply by Korenje March 1, 20072007-03-01
On Mar 1, 8:38 am, "Bartek" <bartekbosow...@interia.pl> wrote:
> > 1 - try an earlier version of CCS (...) > > I started with 3.1 and it was the same problem. I was hoping that 3.3 > would change something... I doubt I'll have access to earlier versions. > > > 2 - (...) Try clearing out the interrupts and acknowledging them > > all, just to be sure. > > When I look at the watch window all flags are 0, interrupt enables 1, but > I did as you suggested - no result. > > > 3 - make sure you have all the proper include files and are performing > > the PIE initialization correctly. > > All registers but flags look good when watched. > > > 4 - If nobody is able to help you here, try posting on TI's discussion > > groups. (...). > > Yeah, I did it before posting here. Gained a bit of attention but no > response ;-( > > What I noticed is that when I set the interrupt flag manually in the watch > window the simulator complains in the message window: > Error: Can't write to data memory 0x801, check memory config [-2184] > > with addresses sometimes being a bit different. Have no idea why it wants > to write anything there, but sure these are forbidden addresses.
Did you enable PIE unit (by calling InitPieCtrl()) Regards, Mitja
Reply by Bartek March 1, 20072007-03-01
> 1 - try an earlier version of CCS (...)
I started with 3.1 and it was the same problem. I was hoping that 3.3 would change something... I doubt I'll have access to earlier versions.
> 2 - (...) Try clearing out the interrupts and acknowledging them > all, just to be sure.
When I look at the watch window all flags are 0, interrupt enables 1, but I did as you suggested - no result.
> 3 - make sure you have all the proper include files and are performing > the PIE initialization correctly.
All registers but flags look good when watched.
> 4 - If nobody is able to help you here, try posting on TI's discussion > groups. (...).
Yeah, I did it before posting here. Gained a bit of attention but no response ;-( What I noticed is that when I set the interrupt flag manually in the watch window the simulator complains in the message window: Error: Can't write to data memory 0x801, check memory config [-2184] with addresses sometimes being a bit different. Have no idea why it wants to write anything there, but sure these are forbidden addresses.
Reply by Noway2 February 28, 20072007-02-28
Bartek wrote:
> Hi, > > I'm working on a project using CCS 3.3.38.2 set up with F2812 Device > Simulator. The project is in C and contains several interrupts (cpu > timer0, eva timer1, xint13). None of them is simulated during debug. This > applies also to the examples from TI (SPRC097 ). During debug IER are > registers set corrctly, cpu timer0 reach 0 and no flag neither in PIE nor > IFR is set. > > here is everything related to cpu timer0 in my code: > > DINT; > .. > CpuTimer0Regs.TCR.bit.FREE = 1; > CpuTimer0Regs.PRD.all = FREQ_CPU/freq-1; > CpuTimer0Regs.TCR.bit.TRB = 1; > CpuTimer0Regs.TCR.bit.TIE = 1; > EALLOW; > PieVectTable.TINT0 = &CpuTimer0ReachZeroIsr; > EDIS; > PieCtrlRegs.PIEIER1.bit.INTx7 = 1; > IER |= M_INT1; > EINT; > >
A couple of suggestions: 1 - try an earlier version of CCS. We recently received the disks to update to version 3.3, but have been unable to find the drivers for the emulator yet, which has made it unusable, so I can't comment on the viability of version 3.3 yet. The fact that you say the example code isn't working either tends to make me even more suspicious. 2 - Off hand, you code looks valid, but it has been a little while since I worked with the software. The only thing I can see that might be potentially missing is a PIEACK statement. Perhaps the interrupt flags are set so that it thinks an interrupt is already in process. Try clearing out the interrupts and acknowledging them all, just to be sure. 3 - make sure you have all the proper include files and are performing the PIE initialization correctly. 4 - If nobody is able to help you here, try posting on TI's discussion groups. Posts there seem to get a lot of reads, but there isn't too much response activity, but it worth a try. Those that do read and respond there will probably also familiar with your setup.
Reply by Bartek February 28, 20072007-02-28
Hi,

I'm working on a project using CCS 3.3.38.2 set up with F2812 Device
Simulator. The project is in C and contains several interrupts (cpu
timer0, eva timer1, xint13). None of them is simulated during debug. This
applies also to the examples from TI (SPRC097 ). During debug IER are
registers set corrctly, cpu timer0 reach 0 and no flag neither in PIE nor
IFR is set.

here is everything related to cpu timer0 in my code:

DINT;
..
CpuTimer0Regs.TCR.bit.FREE = 1;
CpuTimer0Regs.PRD.all = FREQ_CPU/freq-1;
CpuTimer0Regs.TCR.bit.TRB = 1;
CpuTimer0Regs.TCR.bit.TIE = 1;
EALLOW;
PieVectTable.TINT0 = &CpuTimer0ReachZeroIsr;
EDIS;
PieCtrlRegs.PIEIER1.bit.INTx7 = 1;
IER |= M_INT1;
EINT;