[ECOS] priority of main thread
Andrew Lunn
andrew@lunn.ch
Thu Nov 20 16:03:00 GMT 2008
On Thu, Nov 20, 2008 at 04:22:58PM +0100, Robert Brusa wrote:
> Hi,
> in my system, I have a cyg_user_start() as well as a main() function. The
> first includes calls to initialize various modules. main() contains an
> eternal loop and is assumed to work as a normal thread. The problem is
> that main produces a hanger when I call cyg_spi_transfer to read my
> onboard-RTC. When using this RTC-module in a test program with a single
> thread it works. It also works (in main) when I change the transfer-mode
> to polling. This let me think that there is some kind of priority
> problem.
I would not necessarily agree with this. If it is a priority problem,
it suggests one of the threads running with higher priority than main
is spinning, so stopping main from running. This is normally a
bug. However this does not really fit with PIO working.
This actually sounds like an interrupt problem. I would put a
breakpoint on the interrupt handler and see if it gets called.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list