Autosar_os runs for a while and then stops. What happened

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autosar_os runs for a while and then stops. What happened

Jump to solution
6,214 Views
lubo_NEW
Contributor III

Following the reference example, in the sample example of AUTOSAR_OS,
a task was added that required the LED light to be reversed once per second
The configuration of EB is shown in the figure
The configuration of EB is shown in the figure,
following the example of TASK1 given by LAB2QQ图片20210315133449.png

0 Kudos
Reply
1 Solution
6,056 Views
namnguyenviet
NXP Employee
NXP Employee

I see in your project:

- OsScheduleTableExpiryPoint3 is setup every 7500 ticks based on the counter of the Schedule Table:

namnguyenviet_1-1616395040620.png

- TaskCnt is setup in this expired point, so it should be called every 7500 ticks

namnguyenviet_0-1616394909534.png

- The OsAlarm_C is setting up incorrectly:

namnguyenviet_2-1616395144736.png

It's because Os_AlarmC is assigned to both TRUSTED_APP and TASK_APP, and only one application should be chosen:

namnguyenviet_3-1616395284371.png

 

 

View solution in original post

0 Kudos
Reply
26 Replies
1,110 Views
lubo_NEW
Contributor III

You are right, OSShutdownos is called in the OSCheckStack function

0 Kudos
Reply
1,148 Views
lubo_NEW
Contributor III

I'm just going to add task A, task B doesn't write anything
At first the task should be able to run, and after a while it should enter the OS_SHUTDOWN functionThe stop task scheduling in shielding stop task can be run all the time

 

0 Kudos
Reply
1,142 Views
namnguyenviet
NXP Employee
NXP Employee

So it means task A can work correctly by commenting out the StopScheduleTable? That would not make sense cause after this, TerminateTask() is called. 

Is there any SW stack perform which function has called TASKSTOP()?

0 Kudos
Reply
1,098 Views
lubo_NEW
Contributor III

Thanks for your reply, I did not define the switch stack as the TASKSTOP function.
This is the sample project of the official MPC574xG_AUTOSAR_OS_4_0_92_RTM_1_0_3 routine
I did not make any changes, except to configure more TaskA and TaskB in the EB configuration, and to add controlled LED inversion tests.
No other changes are being made,

0 Kudos
Reply
1,138 Views
lubo_NEW
Contributor III

QQ图片20210315134600.pngThe code for the task is as follows, and it stops shortly after it runs

QQ图片20210315132329.png

The simulation stopped at the task close function as shown in the figure

What is the reason for this

 

 

0 Kudos
Reply
1,127 Views
lubo_NEW
Contributor III

QQ图片20210315151758.png

When I block the sentence "stop in schedule table" in the Task (TaskStop) TASK,
I can continue running as shown in the figure.Task (TASKRCV1) can be restarted.
Task (TASKRCV1) can be restarted.

Task (TaskRcv1) is a working process, can you explain it in detail

 

 

0 Kudos
Reply