Hi!
I'm using BIOS 6.21.02.19 with CCS4 and a C6748
I'm setting up MCASP to transmit audio data and generate an XDATA interrupt for each sample. This works ok for a while, I'm getting a few interrupts before it stops sending data. The amount of time it takes before it stops I found is dependent on the Clock.tickPeriod value in the cfg file. This leads me to believe that the timer interrupt for the kernel turns off or somehow messes with the mcasp interrupt. I am not using the ECM. Why is this and how can I avoid it?
Here is my interrupt init code:
Hwi_Params_init(&hwiParams);
hwiParams.eventId = 61;
hwiParams.enableInt = false;
hwi0 = Hwi_create(4, mcaspIsr, &hwiParams, NULL);
The interrupt is enabled later with
Hwi_enableInterrupt(4);
SETBIT(MCASP->XINTCTL, 0x21);
Here is my isr:
void mcaspIsr(UArg ipr)
{
uint32_t regVal;
regVal = MCASP->XSTAT;
if(CHKBIT(regVal, 0x20))
{
MCASP->XBUF0 = sinetable[sample++];
if (sample>=48) sample=0;
SETBIT((*EVTCLR1), 0x20000000);
}
if(CHKBIT(regVal, 0x01)) {
mcasperrflag++;
SETBIT((*EVTCLR1), 0x20000000);
}
}
There is no Hwi setup done in the bios.cfg file.
After it stops working I print out some register values:
MCASP status:
mcasp0 xstat: 0x0000015d
mcasp0 xintctl: 0x00000021
mcasp0 xgblctl: 0x00001f1f
IER: 0x00004013 IFR: 0x00000000 CSR: 0x14000103
mcasp0 sample: 11, error 1
INTMUX1: 0x0706053d
INTMUX2: 0x0b0a0908
INTMUX3: 0x0f040d0c
EVTFLAG0: 0x00000019
EVTFLAG1: 0x00000000
EVTFLAG2: 0x00000000
EVTFLAG3: 0x04000001
It seems the eventflag for mcasp is now cleared and is never set again even though it is still enabled in xintctl and IER. What am I missing?
Thanks for reading,
Ole Gauteplass