Part Number: OMAPL138B-EP
Other Parts Discussed in Thread: OMAPL138, SYSBIOS
Tool/software: TI C/C++ Compiler
Hello all,
I am working on the OMAPL138 DSP in a System with multiple Tasks, all using (single precision) floating Point calculations.
I Need to add the following Code in the main() Task:
typedef struct
{
float32 InputVal;
int32 Position;
} _Sample_t;
typedef struct /*union*/
{
_Sample_t Sample[4096];
double Val[4096];
} Buffer_t;
static Buffer_t Buffer[3];
[…]
// main Task function
float32 InputVal;
int32 Position;
usign32 i;
for (i = 0; i < 4096; i++)
{
InputVal = Buffer[AxisID].Sample[i].InputVal;
Position = Buffer[AxisID].Sample[i].Position;
_disable_interrupts();
Buffer[AxisID].Val[i] = InputVal;
_enable_interrupts();
}
This Code works only with the Interrupt lock as shown. When I remove it, it would disturb the calculations in a fast task.
I was not able to find out what exactly happens. I also failed in creating an easier Code that would show the Problem.
Thanks for any help.
Alexander