Search found 32 matches

by fotis
Sat Nov 23, 2019 5:47 pm
Forum: ChibiOS/RT
Topic: Last instruction executed by thread.
Replies: 5
Views: 911

Re: Last instruction executed by thread.

This is exactly what I initially tried. As I see only LR is stored in the context structure (at least for the Cortex M4), which I expect to become the new PC when the thread is again scheduled in. The thing is that LR always points a Chibios function, that one that caused the context switch, and I l...
by fotis
Sat Nov 23, 2019 3:22 pm
Forum: ChibiOS/RT
Topic: Last instruction executed by thread.
Replies: 5
Views: 911

Re: Last instruction executed by thread.

Sorry, it wasn't clearly stated. I am looking for ways to automate this. So when the watchdog times-out, this information should be collected and stored, for later analysis. This is for the cases where the faults occur during the normal operation of the device, and not during development (and thus t...
by fotis
Sat Nov 23, 2019 3:05 pm
Forum: ChibiOS/RT
Topic: Last instruction executed by thread.
Replies: 5
Views: 911

Last instruction executed by thread.

Hi, I am playing around with Chibios on an STM32F427, but I face a hard to diagnose issue. There are about 4 different threads running, one of which implements a software watchdog. The rest of the threads have to "feed" this watchdog thread to keep the system running. For some reason, one ...
by fotis
Mon Feb 18, 2019 8:52 pm
Forum: Bug Reports
Topic: Priority order violation - Asserion fails Topic is solved
Replies: 41
Views: 5318

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: 5318

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: 5318

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: 5318

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: 5318

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: 5318

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: 5318

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...

Go to advanced search