Part Number: TMS320F280049
Dear Champs,
I am asking this for our customer.
The user wonders if it possible to change CLA codes from flash to RAM "online".
The CLA can be stopped (not triggered) temporarily during code change.
For example, A(), B() are both in the flash initially.
A() is moved from flash to CLA program RAM (task1) first and run.
When an event happens, then CLA stops running, and then move B() codes from flash to CLA program RAM (task1) and override A(), and then run B().
Likewise, when another event happens, then CLA stops running, and then move A() codes from flash to CLA program RAM (task1) and override B(), and then run A().
Based on the event, the CLA should be able to run either of A(), B().
Note that because the total code size of A()+B() are much larger than CLA program RAM, the user could not put them together on CLA program RAM. The user could not put A() or B() on CPU either because CPU is occupied by others.
Questions:
1) Is it possible to run CLA A() or B() like the above?
2) Because the use of function pointers is not supported on CLA C compiler, the A(), B() should be used like this way in CLA task1 where one of A() and B() is on CLA program RAM and the other is on flash at the same time.
Does this work?
That is, if the user can ensure that the code (either A() or B()) running on CLA is on CLA program RAM at that time, is there any concern (from compiler/HW) about writing codes in this way?
CLA_task1()
{
if (event A)
{
A()
}
else
{
B()
}
}
3) OR do you have any other suggestion for writing CLA codes for the above usage?
Wayne Huang