irq

Setting up IRQ mapping

I'm following several tutorials and references trying to get my kernel set up, and I've come across voodoo code in a tutorial that isn't explained at all. Its code that I'm told maps the 16 IRQs (0-15) to ISR locations 32-47: void irq_remap(void) { outportb(0x20, 0x11); outportb(0xA0, 0x11); outportb(0x21, 0x20); outport...

Problems with IRQs when connecting two digium card in and asterisk box

I have two Digium Wildcard TDM800P with 8 FXO ports each. When I connect both at the same time IRQ misses start showing up making my computer unresponsive and unusable. One card works fine but I need all 16 FXO ports to work to receive calls from my Telco. Is there a way for the cards to communicate with each other so they don't genera...

Porting driver from PPC2003 to WM6: ISR not called

I'm trying to port the driver I've developed for a custom device that uses the CF port of the iPAQ hx4700. The target is the new iPAQ 210 that runs Windows Mobile 6. Although WM6 (and Windows CE 5.0) switched to a new driver architecture, it claims to support legacy drivers. Everything is working fine (registration, memory mapping, etc...

Embedded Linux PowerPC: How to access of dts file from an i2c detect function

I am working on an embedded linux kernel project for a 83xx powerpc using a 2.6.24 kernel and having some issues extracting information out of the open firmware DTS file for a i2c device driver. For a memory mapped device I would add normally add entry in the DTS file that specified the address / IRQ parameters etc. Then in the associat...

How CPU finds ISR and distinguishes between devices

I should first share all what I know - and that is complete chaos. There are several different questions on the topic, so please don't get irritated :). 1) To find an ISR, CPU is provided with a interrupt number. In x86 machines (286/386 and above) there is a IVT with ISRs in it; each entry of 4 bytes in size. So we need to multiply int...

How to register a function in a driver code as its ISR

Following the feedback i got from: http://stackoverflow.com/questions/2683682/new-to-linux-kernel-driver-development/2683819 In linux-kernel (v 2.6.32), I have written a driver (.c file) by comparing it with an existing driver and "borrowing" heavily from its code. The driver is registered fine and init() and probe() are working fine. ...

ARMv6 FIQ, acknowledge interrupt

I'm working with an i.mx35 armv6 core processor. I have Interrupt 62 configured as a FIQ with my handler installed and being called. My handler at the moment just toggles an output pin so I can test latency with a scope. With the code below, once I trigger the FIQ it continues forever as fast as it can, apparently not being acknowledg...

how do I block all IRQ's during short (5ms) frame data transfer

I am an old hand with hardware and device drivers and used much earlier Linux versions for hardware control. I am recently back in the game of Linux and device control using embedded processing and have discovered a lot has changed in the Linux world (for the better). However, I am struggling with a hardware control issue involving a ver...

Keyboard interrupts

Hi all, I am studying low-level device driver stuff. I am confused between interrupts and IRQ. A sample driver code that hooks keyboard suggests keyboard interrupt is 0x31 but my book on microprocessor says it is 0x09. On opening 'Device Manager->Keyboards->Resources', it shows IRQ is 1. Can anyone clarify this? Thanks, Sanjeev ...

Custom RS485 Protocols

I am writing a simple multi-drop RS485 protocol for serial communications within a distributed system. I am using an addressable model where slave devices are given a window of 20ms to respond. The master uC polls the connected devices for updates and they respond accordingly. I've employed checksums and take the necessary overrun pre...

What's the most accurate way of measuring elapsed time in a modern PC?

I know I can use IRQ0, which is the system timer, but this is based on a 14.31818MHz clock, right? Is there anything offering greater precision? Thanks. Edit: Does anyone know what the Windows function QueryPerformanceCounter uses? ...