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.
Hi,
I'm developing with TI DSP F28035 now.
I used the code as the following but the function return value is always wrong displayed.
the code:
__interrupt void Cla1Task6 ( void )
{
//
// for PLL Simple Test
//
costh = CLAcos(Theta);
sinth = CLAsin(Theta);
Wpll = (2. * PI * Grid_Freq);
Theta += (Wpll) * Tsamp;
.
.
}
Tsamp value is period.(about 52.083E-6)
This routine is always called from Timer Interrupt 0 during every 100 us.
Theta value is no problem.
But, costh, sinth value doesn't change and always the values are 0.
Is CLAmath Lib support F28035 DSP?
Is there anyone help to me about this?
Thanks,
JCLEE
Hi,
JOO CHEOL LEE said:But, costh, sinth value doesn't change and always the values are 0
Sounds like either the code is not running from CLA program RAM or the sin, cos tables are not in CLA accessible data ram. Make sure the section CLA1mathTables are in RAM: if you are loading to flash you need to copy this section over to RAM at runtime; it must be copied to a RAM block the CLA has access to (you will find this info in the datasheet) and then you need to have the C28x give ownership of that RAM over to the CLA (using the MMEMCFG registers).
If you take a look at the examples, they all have a FLASH build configuration that shows you how to do all that i have mentioned. The examples are for the 2806x but they can be adapted to the 28035 relatively easily.
Hi Quote,
Thank you for your guide.
With your comments, I added on Linker CMD file as the following and it worked fine.
in F28035_Linker.CMD,
SECTIONS
{
CLA1mathTables : LOAD = FLASHB,
RUN = RAML2,
LOAD_START(_CLA1mathTablesLoadStart),
LOAD_SIZE(_CLA1mathTablesLoadSize),
RUN_START(_CLA1mathTablesRunStart),
PAGE = 1
}
in main.c
memcpy(&CLA1mathTablesRunStart, &CLA1mathTablesLoadStart, (Uint32)&CLA1mathTablesLoadSize);
Thank you for your help.
JC