This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: load monitoring (on an ARM)


> Thanks Andrew for the cpuload code!  It seems to work quite
> nicely.

Good.
 
> However, one pitfall of using idle_thread_loops as the indicator
> of CPU load is that the code in HAL_IDLE_THREAD_ACTION can
> interfere.

Yep. I thought about that when i designed to code and then ignored it
because my system is always plugged into the mains.

I think the only way out of the idle loop is via an interrupt.  I
assume you get your tick interrupts from a high speed clock. When you
go into idle mode read the high speed clock. In the interrupt
processing code add another read to the high speed clock. Subtract and
you have the time in idle mode.

        Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]