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.
Hello experts,
I have configured a CLA task that is triggered by ADC interrupt.
The ADC Interrupt is wotking fine,
But, the code stops at the first line of cla task and after resuming, the code inside the task is not executed.
For reference, I am incrementing a u16 variable inside cla task but its value stays 0 all the time.
My cla configuration is as follows:
CLA Init:
void CLA_init() { #ifdef _FLASH #ifndef CMDTOOL // Linker command tool is not used extern uint32_t Cla1ProgRunStart, Cla1ProgLoadStart, Cla1ProgLoadSize; extern uint32_t Cla1ConstRunStart, Cla1ConstLoadStart, Cla1ConstLoadSize; // // Copy the program and constants from FLASH to RAM before configuring // the CLA // memcpy((uint32_t *)&Cla1ProgRunStart, (uint32_t *)&Cla1ProgLoadStart, (uint32_t)&Cla1ProgLoadSize); memcpy((uint32_t *)&Cla1ConstRunStart, (uint32_t *)&Cla1ConstLoadStart, (uint32_t)&Cla1ConstLoadSize ); #endif //CMDTOOL #endif //_FLASH cla1_init(); }
CLA Task:
volatile uint16_t claTestVar_u16; __attribute__((interrupt)) void Cla1Task1() { claTestVar_u16++; }
Where in memory is the claTestVar_u16 stored? Double check that the CLA has the ability to write to this memory - either the CLA to CPU message RAM, or the CLA has given an LS RAM ownership to the CLA.
Hi Lori,
The variable is stored at 0x8800 address which belongs to LS01 RAM (Checked in .map file).
We have also selected LS01 for CLA in MEMCFG of sysconfig.
Also configured LS01 for CLA RAM in linker file.
The CLA Task is executing. We can hit the breakpoint with _mdebugstop(), but the variable value remains 0 and does not change.
Screenshots of mapfile, memcfg configuration in sysconfig and linker script attached.
So the CLA to CPU and CPU to CLA RAM initialization was missing, After doing which the CLA Task is executing as expected.
Thanks