Other Parts Discussed in Thread: C2000WARE
Dear Champs,
I am asking this for our customer?
The user uses CLA task8 as background task.
We found, such simple statement could not be used in the background task as long as EALLOW/EDIS are used.
1. Below codes in
#pragma INTERRUPT(Cla1Task8_background, "BACKGROUND")
interrupt void Cla1Task8_background()
{
......
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 0;
EDIS;
.......
}
2. Below codes in a sub inline function called in the background task.
#pragma INTERRUPT(Cla1Task8_background, "BACKGROUND")
interrupt void Cla1Task8_background()
{
......
config_PWM_to_GPIO();
.......
}
#pragma FUNC_ALWAYS_INLINE(config_PWM_to_GPIO)
static inline void config_PWM_to_GPIO()
{
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 0;
EDIS;
// GPIO_setPinConfig(GPIO_0_GPIO0); this is not allowed either because EALLOW/EDIS are used inside.
}
The compiler errors are:
error #99923: CLA does not permit function calls in background tasks. Try inlining function.
Is EALLOW/EDIS not allowed in CLA background task?
If so, how does the user modify these registers protected by EALLOW in CLA background task?
Wayne Huang
