Autosar_os runs for a while and then stops. What happened

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Autosar_os runs for a while and then stops. What happened

跳至解决方案
6,488 次查看
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 项奖励
回复
1 解答
6,330 次查看
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

 

 

在原帖中查看解决方案

0 项奖励
回复
26 回复数
1,144 次查看
lubo_NEW
Contributor III

You are right, OSShutdownos is called in the OSCheckStack function

0 项奖励
回复
1,182 次查看
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 项奖励
回复
1,176 次查看
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 项奖励
回复
1,132 次查看
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 项奖励
回复
1,172 次查看
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 项奖励
回复
1,161 次查看
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 项奖励
回复