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 expert,
My customer defined a structure array (Sys) in CLA_DATA_RAM (LS0~LS1). One member (X1) in this structure located in 0x8744. This structure (Sys) is updated in CLA, for test purpose, we put decimal number 1.2346 in it.
We hope CPU can get latest content from X1 though CLA data ram isntead of a message ram. (Is that feasible? I didn't see limitions here)
The issue we met is:
When we read the content of X1 from CPU in two different ways, one can work, the other can not.
WORKED:
=*(float32_t*)0x8744
.dwpsn file "D:/02 MyJob_Projects/。。。",line 273,column 9,is_stmt,isa 0
MOVL XAR5,#34628 ; [CPU_ARAU] |273|
MOVL XAR6,*+XAR5[0] ; [CPU_ALU] |273|
MOVB ACC,#74 ; [CPU_ALU] |273|
ADDL ACC,*-SP[4] ; [CPU_ALU] |273|
MOVL XAR4,ACC ; [CPU_ALU] |273|
MOVL *+XAR4[0],XAR6 ; [CPU_ALU] |273|
NOT WORKED:
=Sys[1].X1
ASM:
.dwpsn file "D:/02 MyJob_Projects/。。。 ",line 272,column 9,is_stmt,isa 0
MOVL XAR6,@_Sys+56 ; [CPU_ALU] |272|
MOVB ACC,#72 ; [CPU_ALU] |272|
ADDL ACC,*-SP[4] ; [CPU_ALU] |272|
MOVL XAR4,ACC ; [CPU_ALU] |272|
MOVL *+XAR4[0],XAR6 ; [CPU_ALU] |272|
We have included "F2837xD_Cla_typedefs.h" here and all the reated sectors in CMD file is aligned 2. What could be the casue or the best practice we should take here?
Thanks
Sheldon
Sheldon,
"We hope CPU can get latest content from X1 though CLA data ram isntead of a message ram." - Yes this is possible. LSRAM can be read by CPU as long as it is not mapped as CLA Program RAM as listed in the "Local Shared RAM (LSx RAM)" in the TRM.
Just to make sure there is no problem with c definitions and usage, can you try setting & accessing a non-cla based similar structure member in the same way from CPU? If this works, we can try checking from the CLA side.
Regards,
Praveen
Sheldon,
Just checking back on this thread. Did you get a chance to look into it?
Regards,
Praveen