Posts: 1
Joined: Mon Jun 05, 2017 12:48 pm

ISR for DMA Interrupt

Tue Jun 06, 2017 2:13 am

This is my first post. This is not truly a bare metal question since I am programming under Raspbian on RPi 3b. This seemed like the most appropriate forum but let me know if better posted elsewhere.

I've written user mode C code to control RPi PCM port and to do DMA transfers from PCM Rx FIFO to memory. I have been using http://www.airspayce.com/mikem/bcm2835 to map hardware addresses into user space. All seems to work as expected. I am working with real time streaming data and now I want to trigger an ISR upon completion of each DMA transfer. ISR will manipulate the data and move it to another buffer. I would like to keep latency less than 50 microseconds. i.e. less than 50 microseconds between DMA interrupt firing and beginning of execution of ISR.

My question: What is the best way to implement the ISR? Do I need to write a linux kernel mode driver to do this? I've read a bit about creating Linux Kernel Modules and using them to create ISRs. This seems doable but I wanted to make sure this is really the best way to go. I've written real time bare metal code for other processors, (ADI SHARC and Blackfin), but I'm not experienced with real time Linux programming on RPi. I am stuck with using Raspbian for my application.
Thanks much in advance for any suggestions/references

Return to “Bare metal”

Who is online

Users browsing this forum: No registered users and 5 guests