This is the mail archive of the ecos-discuss@sources.redhat.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: Enabling Interrupts



Christoph Csebits <Christoph.Csebits@frequentis.com> writes:
> i am working on an eCos port for a PowerPC MPC860T
> based board. On the board is a simple "load and go"
> bootstrapper doing simple board initialization.
> 
> Serial ports under eCos are not yet working, but
> i have blinking leds (based on simple hello.c).
> 
> Then i started to try this with two threads.
> My problem is, that enabling the interrupts
> (in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
> never returns. 
> 
> Any idea, where to start?

You probably have an interrupt loop; ie. some source is interrupting and
there is no handler, so the CPU spins being interrupted constantly.  Or
it's hung up trying to use the serial, or something.  If you had a serial
port you might see the results of this code from hal_misc.c (so long as
you're not using VIRTUAL_VECTOR_SUPPORT when an empty routine is used
instead):

externC cyg_uint32
hal_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
{
    diag_printf("Interrupt: %d\n", vector);

    CYG_FAIL("Spurious Interrupt!!!");
    return 0;
}

You could modify that to diddle your LEDs and loop forever so you know it
was in there; print the interrupt vector number in LEDflashes.  Track down
the hardware that's on that interrupt number and shut it down and mask its
interrupt during startup so it's not interrupting and you can move onto the
next inexplicable crash ;-)

HTH,
	- Huge


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