FIQ interrupts (2103)

Questions about the BASICtools and MakeItC
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

FIQ interrupts (2103)

Post by YahooArchive »

I've loaded my FIQ ISR address into FIQ_Addr in crt0.s assembly code. I have
included the FIQ_ISR.h code in my Main program.

The FIQ_ISR is not much more than a printf("characters");

I generate the Interrupts from pin 15 with a LED toggle routine in my Main
program. I can observe the LED flash ON and OFF.

I have jumpered pin 15 to pin 14 (EINT0), but the ISR never prints to the
Terminal.

Do I have to change PINSEL1 to get pin 14 to be EINT0?



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

Assuming you want to interrupt on EINT0

VICIntEnable register has to enable that
VICIntSelect register has to choose that for FIQ
and yes PINSEL1 will have to choose EINT0 over GPIO

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

And you probably want to set EINT0 to interrupt on an edge, the power on default
is level.

And an unrelated note-

If you send us an email, and expect a response, please use a valid email
address, that includes you to Wes.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

Like  this?
 
PCB_PINSEL1 |= 0x00000001; //Select IO14 (PO.16) as EINT0 pin.
 VICIntSelect = 0x00004000;  //Select EINT0 as FIQ Interrupt
 VICIntEnable = 0x00004000;  //Enable EINT0 Interrupts
 

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

It still doesn't run. I looked at the .lss file and the FIQ_ISR is compiled. It
should run once in two seconds. The LED rate is ON for a second and OFF for a
second.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

> It still doesn't run. I looked at the .lss file and the FIQ_ISR is compiled.
It should run once in two seconds. The LED rate is ON for a second and OFF for a
second.
>

You're going to have to look at the registers, especially the interrupt status
registers to see if the hardware is setup correctly.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

> It still doesn't run. I looked at the .lss file and the FIQ_ISR is compiled.
It should run once in two seconds. The LED rate is ON for a second and OFF for a
second.
>

We haven't been using FIQs so I can't give you an example.

The best place to look would be at NXP's documents, they do publish software
examples for many of their peripherals. Just googling I found this one using a
timer and FIQ

http://ics.nxp.com/support/documents/mi ... n10254.pdf

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

--- In ARMexpress@yahoogroups.com, "basicnode" wrote:
>
> > It still doesn't run. I looked at the .lss file and the FIQ_ISR is compiled.
It should run once in two seconds. The LED rate is ON for a second and OFF for a
second.
> >
>
> You're going to have to look at the registers, especially the interrupt status
registers to see if the hardware is setup correctly.
>
How do I get to the registers?

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

> How do I get to the registers?
>

There's the old fashion way with printf (use pointers to get the value)

Or there was a reference to breakpoint() in Csample which calls the same
routines we have in BASIC when the program is idle. It allows you to dump
memory using the @hexvalue typed into the command line.

Its still is Csample, but something appears to be missing and no link error is
being reported.

So I just yanked the source and stuck it into a version of Csample.c that is
posted here in the files section.

From Csample
enter 55 to call brkpoint (names changed to avoid linker conflicts)
to continue with the program type ^

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: FIQ interrupts (2103)

Post by YahooArchive »

I got a memory dump at location 0.
The first value value is 0x40. That's the location of the Reset Handler.

The next value is 0x2720. It should be the location for the Undefined Address
exception, but the Undefined Address is located at 0x924.

The same holds true for the other exceptions including the FIQ_ISR. The FIQ_ISR
address is @0xa80, but the exception memory dump has )x287C.

I appears that there is some Offset in all the Exception Vectors except the

Post Reply