EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Sharp LH79520 int controller (arm7 core)

Started by Alfie March 3, 2004
I've wasted a couple of days trying to get timer 2 to IRQ through the
Vectored Interrupt Controller (VIC) - it always ends up in the default
handler.

If anyone has an example C or assembler snippet you'd bring a little
light into a frustrated programmers miserable life.

I'm actually using a development kit called CardEngine by logicpd and
the message their loader squirts out is "NO HANDLER FOR INTERRUPT",
which I presume is the default handler.

Huge thanks,
Alfie.
I'd like to see how you're initializing the VIC. From the docs, it looks
straight forward. I'm wondering if the MMU is mapping the VIC elsewhere. You
might double-check by looking at the addresses you think the vectors are at and
seeing if they are pointing to the board's default vectored IRQ handler.

You also might want to check the instruction at the ARM's IRQ vector to make
sure it is loading the VectorAddr into the PC.

"Alfie" <AlfieNoakes@blueyonder.co.uk> wrote in message
news:5f984b6d.0403030420.1dbe4968@posting.google.com...
> I've wasted a couple of days trying to get timer 2 to IRQ through the > Vectored Interrupt Controller (VIC) - it always ends up in the default > handler. > > If anyone has an example C or assembler snippet you'd bring a little > light into a frustrated programmers miserable life. > > I'm actually using a development kit called CardEngine by logicpd and > the message their loader squirts out is "NO HANDLER FOR INTERRUPT", > which I presume is the default handler. > > Huge thanks, > Alfie.
I too am struggling with a Sharp baes CardEngine but not the 79520... experience would be valuable. What sort of JTAG do you used? -- Peter Peter.Dickerson (at) ukonline (dot) co (dot) uk
AlfieNoakes@blueyonder.co.uk (Alfie) writes:

> I've wasted a couple of days trying to get timer 2 to IRQ through the > Vectored Interrupt Controller (VIC) - it always ends up in the default > handler. > > If anyone has an example C or assembler snippet you'd bring a little > light into a frustrated programmers miserable life.
I've not looked at this for a while, but here's my code. #include "lh79520_timer.h" #include "lh79520_vic.h" #include "lh79520_rcpc.h" /* These headers are from the sharp "bluestreak" library */ /* initialise timer1 as real time vectored interrupt */ VIC->vectaddr[15] = (int) TIMER2_irq_handler; VIC->vectcntl[15] = 0; /* select source and enable it */ VIC->vectcntl[15] = VIC_VECTCNTL_SELECT(VIC_TIMER2); VIC->intenable = VIC_INT_ENABLE(VIC_TIMER2); TIMER1->load = 51609U; /* 1 millisecond */ TIMER1->control = TMRCTRL_ENABLE | TMRCTRL_MODE_PERIODIC ; /* enable the timer clock */ RCPC->periphclkctrl &= ~RCPC_CLKCTRL_CT01_DISABLE; -- John Devereux

The 2024 Embedded Online Conference