Hello
I'm a beginner with DSP/BIOS. I'm using a DSK6455 + 5-6K + ADS1274EVM, CCS v4.2.3 and BIOS 5. I use HWI 13 with event 40 (McBSP0) and one task. The task must work when ISR catch a pointer, but it doesn't work. I've test the code and I think that CSR.GIE bit is disabled when task works, but I'm not sure.
This is my code:
#include <std.h>
#include <buf.h>
#include <sem.h>
#include <log.h>
#include <clk.h>
#include <tsk.h>
#include <sys.h>
#include <hwi.h>
#include <stdio.h>
#include <c64.h>
#include <dsk6455.h>
#include "mcbsp.h"
extern LOG_Obj trace;
extern BUF_Obj bufferPool;
extern BUF_Obj bufferFirst;
extern TSK_Obj TSK0;
void main(void)
{
........
C64_disableIER(C64_EINT13);
........
C64_enableIER(C64_EINT13);
}
void taskProm() //The task
{
int i;
SEM_pendBinary(&SEM0, SYS_FOREVER);
for (i=0; i<rate; i++)
{
acum = acum + buffPtr_First[i];
}
buffPtr_Out [codecPoint] = acum / rate;
codecPoint++;
acum=0;
firstPoint = 0;
flag=0;
LOG_printf(&trace, "el promedio se ha calculado\n");
if (codecPoint == SIZE_BUFFER) //SIZE_BUFFER
{
LOG_printf(&trace, "el valor de codecPoint es %d\n", codecPoint);
}
}
void eventMcBSP0() /The ISR
{
buffPtr_First[firstPoint] = MCBSP_DRR_32BIT;
firstPoint++;
if (firstPoint == rate)
{
LOG_printf(&trace, "se lleno el buffer\n");
SEM_postBinary(&SEM0);
flag=1;
}
}
Could you help me?
Best regards.
Manuel Fernández Ros
.