Hi,
In my project, I am an using the c28 and CLA cores and I am now debugging my codes that relates to the CLA but the debuging of the codes called by the CLA routines are not clear. I am using the
PCMC_PSFB_nonpowerSUITE_F28004x example as a guide to my development
My CLA routine is below
interrupt void Cla1Task3(void)
{
static int test;
__mdebugstop();
test++;
CLATask3FunctionCCL();
}
The above routine is regularly called.
The function CLATask3FunctionCCL() is located in a .h file. This is a .h file for a .c file. The function content is below
static inline void CLATask3FunctionCCL(void)
{
/**< current control loop calculation */
s_ccl_var.i_ref = 99;
s_ccl_var.i_ref = s_avg_var.rec_volt * s_avg_var.sin_factor * vcl_iac_ref;
s_ccl_var.rec_curr = CAL_REC_CURR(AdcbResultRegs.ADCRESULT3);
s_ccl_var.ccl_unit_ref_val = s_ccl_var.i_ref;
s_ccl_var.unit_rec_curr = s_ccl_var.rec_curr;
s_ccl_var.ccl_cont_signal = DCL_runPI_L5(&cla_con_pfc_ccl_pi_para, s_ccl_var.ccl_unit_ref_val, s_ccl_var.unit_rec_curr);
//avg_var_rec_volt_cla = (short)s_avg_var.rec_volt;
ccl_cont_signal_cla = (short)s_ccl_var.ccl_cont_signal;
}
The above code is in the flash memory and called from the CLA task above.
The variables have been put in a RAM that can be accessed by the CLA and the Ram has been configured as such and also the CMD file. Sections of the code for this are below
controlVariablesCla : > RAMLS3, PAGE = 1
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS3, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setCLAMemType(MEMCFG_SECT_LS3, MEMCFG_CLA_MEM_DATA);
The variables are put in the controlVariablesCla using the DATA_SECTION option.
When debugging and the C28 core is running,
1. Setting a breakpoint in the function is not possible
2. The function variables are not been updated in the Expression view
3. The memory locations are also empty.
Is the above situation normal?
4. Since the code is located in the .h file, should I use a DCL_runPI_C1 instead of a DCL_runPI_L5?
5. Is the function CLATask3FunctionCCL suppose to be in the flash or in the ram?
When I change the debugging to CLA
1. The breakpoint I set works fine.
2. The variables are not been updated in teh expression view.
3. The memory locations are also empty.
Is the above normal?
Thanks
Babatola Abayomi
