comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: longest path through a task
Date: Fri, 29 May 2015 17:31:25 +0100
Date: 2015-05-29T17:31:25+01:00	[thread overview]
Message-ID: <ly382f9wgy.fsf@pushface.org> (raw)
In-Reply-To: lymw0o1wvt.fsf@pushface.org

Simon Wright <simon@pushface.org> writes:

> Just did some measurements (clumsily) using the Cortex-M4 counter as
> in [1], and from entering the Ada handler to the triggered task
> starting to execute averaged at 1200 cycles (6.7 us) with -Og, 1070
> cycles (5.9 us) with -O2. There is some code in the C handler to
> redirect to the Ada handler: see [2], starting at line 236.

The code in the C handler takes 150 cycles.

So, for my FreeRTOS-based RTS, interrupt to Ada handler is 150 cycles,
Ada handler to task is 1200 cycles, grand total 1350 cycles or 7.5
microseconds (core clock 180 MHz).

I understand that a 1-millisecond tick is inadequate for some control
applications (though the Crazyflie seems to do OK with FreeRTOS); maybe
one could use one of the other timers on the STM32F4 to act as the basis
for the hard control loop, while retaining the Ada tasking for less
demanding aspects?

  parent reply	other threads:[~2015-05-29 16:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 19:38 longest path through a task jan.de.kruyf
2015-05-27 20:09 ` Niklas Holsti
2015-05-28  6:54   ` jan.de.kruyf
2015-05-28  9:04     ` Niklas Holsti
2015-05-28 12:27       ` brbarkstrom
2015-05-28 14:01         ` jan.de.kruyf
2015-05-28 13:04       ` jan.de.kruyf
2015-05-29  4:38         ` Niklas Holsti
2015-05-28 16:37     ` Simon Wright
2015-05-28 17:43       ` jan.de.kruyf
2015-05-28 17:52         ` Simon Wright
2015-05-28 18:12           ` jan.de.kruyf
2015-05-29 16:31       ` Simon Wright [this message]
2015-05-30 10:50         ` jan.de.kruyf
2015-06-01 13:32         ` Patrick Noffke
2015-06-01 19:09           ` Simon Wright
2015-06-02 22:15           ` Stephen Leake
2015-06-01  4:27   ` Windows Text_IO.Get_Line issue tornenvi
2015-06-01  5:01     ` tornenvi
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox