erika aurix

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
kanch
Newbie
Posts: 5
Joined: Mon Nov 05, 2018 8:30 am

erika aurix

Post by kanch » Tue Nov 06, 2018 10:59 am

hi,
I'm new to Erika version 2. I'm using it for Infineon AURIX TC267D and having issue regarding the timer.
1) there are various tasks in my OSTask.c like ostask_5ms(), ostask_10ms(), ostask_20ms(), etc. and it is expected that they should be called within mentioned time i.e ostask_5ms() in 5 milliseconds .
But it is observed that all these tasks are being called after 42 to 45 sec.
There is no function of 42sec or 45 sec.
can anyone help me out where the problem would possibly be?
****************************
my software framework tool is:

Release version: 3.1
*************************************oil file*****************************
CPU TC26X {

OS IFX_TRICORE {
MCU_DATA = TRICORE {
MODEL = TC26x;
};
CPU_DATA = TRICORE {
CPU_CLOCK = 200.0;
COMPILER_TYPE = GNU;
MULTI_STACK = TRUE {
IRQ_STACK = TRUE {
SYS_SIZE = 256;
};
};
};
STATUS = EXTENDED;
PRETASKHOOK = FALSE;
POSTTASKHOOK = FALSE;
USERESSCHEDULER = FALSE;
KERNEL_TYPE = ECC2;
};

APPMODE TRICORE_CPU {
EVENT = IFX_OSCFG_EVENT1;
EVENT = IFX_OSCFG_EVENT2;
EVENT = IFX_OSCFG_EVENT3;
TASK = IFX_OSTASK_EVENT1;
TASK = IFX_OSTASK_EVENT2;
TASK = IFX_OSTASK_EVENT3;
TASK = IFX_OSTASK_1MS;
TASK = IFX_OSTASK_5MS;
TASK = IFX_OSTASK_10MS;
TASK = IFX_OSTASK_20MS;
TASK = IFX_OSTASK_50MS;
TASK = IFX_OSTASK_100MS;
TASK = IFX_OSTASK_BACKGROUND;
TASK = IFX_OSTASK_INIT;
COUNTER = HW_COUNTER;
ALARM = IFX_OSTASK_ALARM_1MS;
ALARM = IFX_OSTASK_ALARM_5MS;
ALARM = IFX_OSTASK_ALARM_10MS;
ALARM = IFX_OSTASK_ALARM_20MS;
ALARM = IFX_OSTASK_ALARM_50MS;
ALARM = IFX_OSTASK_ALARM_100MS;
};

EVENT IFX_OSCFG_EVENT1 {
MASK = 0x01;
};

EVENT IFX_OSCFG_EVENT2 {
MASK = 0x02;
};

EVENT IFX_OSCFG_EVENT3 {
MASK = 0x04;
};

TASK IFX_OSTASK_EVENT1{
PRIORITY = 64;
ACTIVATION = 1;
AUTOSTART = FALSE;
EVENT = IFX_OSCFG_EVENT1;
SCHEDULE = FULL;
STACK = PRIVATE {
SYS_SIZE = 256;
};
};

TASK IFX_OSTASK_EVENT2{
PRIORITY = 64;
ACTIVATION = 1;
AUTOSTART = FALSE;
EVENT = IFX_OSCFG_EVENT2;
SCHEDULE = FULL;
STACK = PRIVATE {
SYS_SIZE = 256;
};
};

TASK IFX_OSTASK_EVENT3{
PRIORITY = 64;
ACTIVATION = 1;
AUTOSTART = FALSE;
EVENT = IFX_OSCFG_EVENT3;
SCHEDULE = FULL;
STACK = PRIVATE {
SYS_SIZE = 256;
};
};

TASK IFX_OSTASK_1MS{
PRIORITY = 64;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_5MS{
PRIORITY = 32;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_10MS{
PRIORITY = 16;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_20MS{
PRIORITY = 8;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_50MS{
PRIORITY = 4;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_100MS{
PRIORITY = 2;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};


TASK IFX_OSTASK_BACKGROUND{
PRIORITY = 1;
ACTIVATION = 1;
AUTOSTART = FALSE;
SCHEDULE = FULL;
STACK = SHARED;
};

TASK IFX_OSTASK_INIT{
PRIORITY = 2;
ACTIVATION = 1;
AUTOSTART = TRUE { APPMODE = TRICORE_CPU; };
SCHEDULE = FULL;
STACK = SHARED;
};

COUNTER IFX_OSTASK_COUNTER
{
MINCYCLE = 5;
MAXALLOWEDVALUE = 10000;
TICKSPERBASE = 1;
};

ALARM IFX_OSTASK_ALARM_1MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_1MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

ALARM IFX_OSTASK_ALARM_5MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_5MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

ALARM IFX_OSTASK_ALARM_10MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_10MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

ALARM IFX_OSTASK_ALARM_20MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_20MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

ALARM IFX_OSTASK_ALARM_50MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_50MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

ALARM IFX_OSTASK_ALARM_100MS
{
ACTION = ACTIVATETASK
{
TASK = IFX_OSTASK_100MS;
};
COUNTER = IFX_OSTASK_COUNTER;
/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
};

};

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: erika aurix

Post by e.guidieri » Tue Nov 06, 2018 12:11 pm

Hi Kanch,

double posting of a misplaced topic in ERIKA3 section, I post mi answer her too, hoping that administrator will delete the wrong topic.

Said that, looking at your configuration I see that you are not using ERIKA's system timer feature (the counter COUNTER IFX_OSTASK_COUNTER is a software counter. It is not configured to be the system timer driven by an ERIKA's internal STM driver) , so the timing behaviour of the system is a responsibility left to the application.

You have to check the configuration of the Timer (STM?) that you are using to drive the system to grant the timing that you want.

Regards,
Errico

P.S. The APPMODE block is ill configured, since there is no COUNTER = HW_COUNTER; configured theonly COUNTER configured is IFX_OSTASK_COUNTER, in any case this seems to not bother the generator too much.

kanch
Newbie
Posts: 5
Joined: Mon Nov 05, 2018 8:30 am

Re: erika aurix

Post by kanch » Thu Nov 15, 2018 6:20 am

Hi
i have gone through the timer configuration as you said and it is working fine.
still I'm facing the same issue.
any other solution which may help me?

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: erika aurix

Post by e.guidieri » Thu Nov 15, 2018 9:41 am

Probably the STM interrupt is not well configured as ISR2.

I suppose that you are working with Infineon iLLD. Infineon did ERIKA's integration with their drivers by them self do not giving us enough information to provide support for this environment. Sorry, but if this is the case you should contact Infineon directly.

For what I can see the ISR is not configured in OIL file and this would be a sure problem with a plain ERIKA's application, but from what I understood they completly bypassed our interrupt vector implementation in their integration.

Regards,
Errico

kanch
Newbie
Posts: 5
Joined: Mon Nov 05, 2018 8:30 am

Re: erika aurix

Post by kanch » Fri Nov 30, 2018 1:08 pm

hi,

where can i get standard oil file (containing interrupts)..?

and how the alarms are configured and how does that work?

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: erika aurix

Post by paolo.gai » Fri Nov 30, 2018 4:57 pm

Dear Kanch,

There are a few examples for aurix in the template examples when you create a project. The "Full Demo 1" has an example of interrupts.

The OIL specification is mostly following the OSEK/VDX standard (also the alarms specification works that way).

Additional information are on those pages:
http://www.erika-enterprise.com/wiki/in ... cification
http://www.erika-enterprise.com/wiki/in ... core_AURIX

Ciao,

PJ

Post Reply