Search found 29 matches

by fotis
Mon Feb 18, 2019 8:52 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Thinking of it again, doesn't this create a race-condition? If the IRQ epilogue is called and then, before the actual IRQ has the opportunity to return, it gets preempted by another interrupt. The second interrupt epilogue will see from the SCB->ICSR that there is another IRQ that is preempted. Upon...
by fotis
Mon Feb 18, 2019 8:38 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Hi, Sure, it is not possible to satisfy everyone of course... But consider adding an option whether this check would be enabled or not. For example, in my case: 1. I want (some) non-Chibios IRQs to have lower priority, to reduce the system jitter. 2. I do not want to add these macros to all non-rela...
by fotis
Mon Feb 18, 2019 7:31 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

After careful examination of the source code and the Chibios traces, I have some more information on this issue, and a possible cause. Let's say that I have the following threads: Thread A, priority 128 Thread B, priority 129 And the following sequence: 1. Thread B executes (higher priority) 2. Thre...
by fotis
Sun Sep 30, 2018 2:39 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Just cross-checked it, the initialization is very similar. Essentially I do the exact same steps, in the same order. I just use C instead of assembly. I do use the dual stack model. Running the Chibios startup code to my project is a very big effort, so I don't think I can do this test. It seems to ...
by fotis
Sun Sep 30, 2018 12:49 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Hi Giovanni, Are you sure these are the only cases that may cause this issue? As you pointed out, 1 is not the case. But after much searching, I can be almost sure that either 2 causes the problem. Apart for a manual search, I also searched both with Eclipse and the ack command my whole source code ...
by fotis
Thu Sep 13, 2018 6:31 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Clarifying. Of course I may use Chibios wrongly in a way that I do not understand.

I am just saying that, if there is a bug, it is mine and not internal to LWIP.

Also note that this problem does not happen to the same thread every time.
by fotis
Thu Sep 13, 2018 6:30 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Yes, but as you see in my stack trace, there are no calls to LWIP ;) I have implemented all these functions. They may call LWIP internally (protected as needed), but LWIP is not able to call any Chibios functions (i.e. NO_SYS=1). In this abstraction layer, I only use the following functions: #define...
by fotis
Thu Sep 13, 2018 6:15 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

I don't believe this is LWIP related. I have developed my own layer between the LWIP (or whatever TCP/IP stack), and Chibios (or any other RTOS). In my application LWIP is running only within a specific thread. I also have set LWIP to NO_SYS=1. Thus LWIP is completely unaware of the RTOS, and does n...
by fotis
Wed Sep 12, 2018 8:27 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

Unfortunately the issue persists. I set CORTEX_SIMPLIFIED_PRIORITY to TRUE and the issue is still reproducible. This is the output of my priorities settings, in this configuration: Priority grouping: 2 Interrupt -14, priority: 0 Interrupt -13, priority: 0 Interrupt -12, priority: 0 Interrupt -11, pr...
by fotis
Wed Sep 12, 2018 7:29 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 3542

Re: Priority order violation - Asserion fails Topic is solved

This is a good idea. I am starting testing now, and I will let you know.

Go to advanced search