Giter Club home page Giter Club logo

Comments (12)

Chalandi avatar Chalandi commented on August 26, 2024

@kuldeepgade : Can you explain more what you mean by "This is not happening" ?

When you have in your application another higher prio task than the 5ms task which became ready just after the execution of the systick interrupt, the OS will switch the context to this higher prio task instead of coming back to the 5ms (after the systick ISR execution).

Is that the case in your application ?

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

16347227869271579428876713873786

@Chalandi : Task execution flow is explained in this diagram

from osek.

Chalandi avatar Chalandi commented on August 26, 2024

@kuldeepgade : Could you share your OS Config file ?

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

@Chalandi :
Configuration file will be in different format.
But, I can share you details like priority.
Idle_Task- 5,
Init_Task - 4,
1ms Task- 3,
5ms Task - 2
All tasks are EXTENDED, SUSPENDED, FULL PREEMPTIVE.

Only INIT Task is AUTOSTART task.

from osek.

Chalandi avatar Chalandi commented on August 26, 2024

What about the stack sizes ? Do you terminate the task TASK_5ms for any reason in your code ?

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024
  1. Stack Sizes assigned for each task = 64 Words = 256 bytes. [How to optimize this? as it consumes much RAM]
  2. I do terminate each Task.

Example:
TASK(T_5MS)
{
for (; ;)
{
function code;
TerminateTask();
}
}

TASK(T_1MS)
{
for (; ;)
{
function code;
TerminateTask();
}
}

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

@Chalandi : it seems like context saving is successful but context reloading / restoring is not happening for preempted task.
Each time it create new context and start execution from beginning of task.

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

@Chalandi : can you suggest something, why control doesn't return after POP instruction execution in both the handlers.
POP("");
BX LR;

from osek.

Chalandi avatar Chalandi commented on August 26, 2024

@kuldeepgade : Could you please share more details about the issue ? maybe share a piece of code and a brief description of the issue in order to help you fixing it

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

@Chalandi : in OsAsm.c, Os_Dispatcher, Line-40,
control never returns to this line after execution of POP instruction on line-39.
Similarly, for Os_Cat2IsrWrapper function,
Control never returns to Line-105, after execution of POP instruction on Line-103.
20211215_202700
20211215_202626

from osek.

Chalandi avatar Chalandi commented on August 26, 2024

@kuldeepgade : how did you checked that the last two instructions are never executed ?
The instruction POP here doesn't update the PC register so the CPU must continue executing the last two instructions (cpsie and bx) before exit the exception handler :

image

Are you running the OS on Cortex-M3 CPU ? This OS version was made for Cortex-M3 without FPU, so if you're running it on any other Cortex-M with FPU enabled you will get some lazy stacking issues as this OS doesn't support the FPU.

from osek.

kuldeepgade avatar kuldeepgade commented on August 26, 2024

@Chalandi : I checked with debugger breakpoints.
Thanks for your inputs.

from osek.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.