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.
Peter,
The arbitration scheme for these registers can be found in the CLA Reference Guide. Keep in mind if the main CPU performs a read-modify-write operation on a register and between the read and the write the CLA modifies the same register, the changes made by the CLA can be lost. In general it is best to not have both processors writing to registers。
Eric
Peter,
如果CPU和CLA同时访问一个shared RAM区域,是要遵循下面的仲裁机制的,即先后顺序,
所以如果CLA正在写这个RAM,CPU来访问,则这时候CPU需要等。所以不会出现问题。
Eric
您好,Eric,
之前您给我解答了好多问题,尤其是CLA问题,我现在又有一个cla问题,就是通过cpu.C改变cla.asm的值,我现在遇到的问题是cla.asm内的变量值可以送到cpu.c,但是通过cpu.c无法改变cla.asm的值。
ti官网上运行28035的例程,运行cla.asm。C:\tidcs\c28\DSP2803x\v121\DSP2803x_examples\cla_adc_fir_flash
问题:我应用的28035的例程,第一步将10赋值给_VoltFilt是对的,这是_VoltFilt等于10,在向下运行时,我设置的A4是200.375,为何_VoltFilt的不更新呢,还一直是10?
请看:在Example_2803xClaAdcFir.c中定义:
#pragma DATA_SECTION(A, "CpuToCla1MsgRAM");
float32 A [FILTER_LEN] = {62.5L, -100.25L, 200.375L, -300.25L, 10.0625L};
在cla.asm中:
_X4 .set _X+8
_X3 .set _X+6
_X2 .set _X+4
_X1 .set _X+2
_X0 .set _X+0
_A4 .set _A+8
_A3 .set _A+6
_A2 .set _A+4
_A1 .set _A+2
_A0 .set _A+0
MDEBUGSTOP
MMOVF32 MR0,#10.6
MF32TOUI16 MR2, MR0 ; Get back to Uint16 value
MMOV16 @_VoltFilt, MR2
MMOV32 MR0,@_X4 ;1 Load MR0 with X4
MMOV32 MR1,@_A4 ;2 Load MR1 with A4
MF32TOUI16 MR2, MR1 ;T Get back to Uint16 value
MMOV16 @_VoltFilt, MR2 ;T
MNOP ;3 Wait till I8 to read result