Hello again.
I had an ARM controller (AT91SAM7L512 if be precise).
It had a Real-Time Timer built-in, which can generate an interrupt request each period of time.
The problem is, documentation didn't specify nor the interrupt vector number, nor how these interrupt should be handled, and I want to handle those interrupt in my C code (and I didn't found anything useful in Google).
Any ideas where I should look at?
Determining interrupt vector number of RTT
- RyoDC
- Mental DCEmu
- Posts: 366
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
-
- DCEmu User with No Life
- Posts: 3641
- Joined: Sat Feb 16, 2002 1:55 pm
- Has thanked: 0
- Been thanked: 0
Re: Determining interrupt vector number of RTT
See section 23 of the full datasheet. It seems to say that all "system peripherals" share the nIRQ line (vector 0x00000018 according to the ARM7TDMI TRM) and that the ISR must check the individual peripherals' status registers to find out which one caused the interrupt. It also describes some other requirements like reading specific registers on the interrupt controller to acknowledge the start/end of interrupt processing.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
- RyoDC
- Mental DCEmu
- Posts: 366
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
Re: Determining interrupt vector number of RTT
So I must find that line then?
How do I try to build a Dreamcast toolchain:
-
- DCEmu User with No Life
- Posts: 3641
- Joined: Sat Feb 16, 2002 1:55 pm
- Has thanked: 0
- Been thanked: 0
Re: Determining interrupt vector number of RTT
No, I mean that there's a vector assigned to that physical interrupt line, i.e. when nIRQ is asserted, the processor fetches the next instruction from 0x00000018. IIRC, a jump instruction is normally placed there to jump to the actual ISR code. Exactly how to do this depends on the toolchain, and I've only ever done C ISRs on a specific AVR compiler, so I wouldn't know the details.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer