[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] autopilot load measurement

From: Martin Mueller
Subject: [Paparazzi-devel] autopilot load measurement
Date: Wed, 07 Sep 2005 14:55:44 +0200
User-agent: Debian Thunderbird 1.0 (X11/20050116)


we wondered what the workload of the AP MEGA128 processor is. Ok, the plan is to replace it with the ARM7 soon...but anyway, we were curious.

First thing was to count the number of "rounds" in the main loop before going to periodic_task(). Simply put a


into the while(1) of mainloop.c and sent the highest and lowest value within 61Hz counted within in one second down. That was around 9800 and 11000. The while(1) loop consists of around 20 assembler instructions, that is (very) roughly 1.25 microseconds. It makes 12.25ms or 13.75ms. This would mean that the processor does run in idle between and 74% and 84% of the time. Huh?

I put a simple timer function into while(1) that was waiting 100 microseconds. This way we are not taking the interrupts into account, but that is only a small amount of processor power, no math.h there.

    timer_temp = timer_now();
    while (abs(timer_now() - timer_temp) < 1600);

Again the loop value was sent down - ranging between 136 and 157 (n * 100 microseconds). That would mean a load of only 4% - 17%?

The whole thing happens on my desk, not in the air. But there is a 3D fix and loops are all working. Hmmmm, am I doing something totally wrong here?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]