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 Team,
When I try to set peripheral clock for ePWM and CLB registers within same EALLOW and EDIS loop, the statement gets executed but the register values are not set. Let me know if this is an expected behaviour.
Please find below the details:
Case1 :
EALLOW;
CpuSysRegs.PCLKCR2.bit.EPWM1 = 1; -> register value set
Clb1LogicCtrlRegs.CLB_LOAD_EN.bit.GLOBAL_EN = 1;/* Enabling CLB tile 1 */ -> executes, no error but register not set
..
EDIS;
Case 2:
EALLOW;
Clb1LogicCtrlRegs.CLB_LOAD_EN.bit.GLOBAL_EN = 1;/* Enabling CLB tile 1 */ -> CLB1 registers properly set
..more CLB1 register settings
CpuSysRegs.PCLKCR2.bit.EPWM2 = 1; -> executes, no error but register not set
Clb2LogicCtrlRegs.CLB_LOAD_EN.bit.GLOBAL_EN = 1;/* Enabling CLB tile 2 */ -> executes, no error but CLB 2 registers not set
..more CLB2 register settings..
EDIS;
Case 3:
EALLOW;
CpuSysRegs.PCLKCR2.bit.EPWM1 = 1;
EDIS;
EALLOW;
Clb1LogicCtrlRegs.CLB_LOAD_EN.bit.GLOBAL_EN = 1;/* Enabling CLB tile 1 */
..more CLB1 register setting
EDIS;
All register set properly.
Kind regards,
Irene
HI Irene,
Let me try to reproduce the issue and get back to you.
Regards,
Veena
Hi Veena,
I understood the issue. There was a function call after this which has EDIS in it which is why it did not work. Also some of the registers that were set after the function call were not EALLOW protected.
Apologies for the inconvenience.
Kind regards,
Irene