Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 22, 2012, 07:20:40 PM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: [1]
Topic Tools  
Read May 04, 2009, 08:34:11 PM #0
brady

using the AIC on the 9260S

Hi all,

I am just starting out, so please forgive my ignorance.

I am trying to configure SPI to use the PDC and throw an interrupt after transfer completion.  I can get the SPI with PDC working, but I am at a loss as to how to handle the interrupt.  My first instinct was just to use the AIC API as outlined in the AT91 manual, but after configuring that correctly (I think), I am getting a kernel complaint from handle_irq, which means there is some OS stuff I have to take into account.  Some investigation leads me to believe that I need to register the handler with the OS as well (or instead?) as with the microcontroller AIC.  This led to me to attempt to include <linux/interrupt.h> in my source, and then things started to really go downhill. 

If anyone could give me a nudge in the right direction I would greatly appreciate it.

-Brady
 
Read May 05, 2009, 12:00:36 PM #1
admin

Re: using the AIC on the 9260S

The Linux kernel has a SPI driver for Atmel 9260 processor.  Maybe you should try to use the SPI driver from the kernel.  If you have to write your own and need to use the interrupt you should use the kernel interrupt handling mechanism.  You should not change the AIC settings directly in your program.  The boot Linux Device Drivers is a good place to find information.  Here is the link to the chapter about interrupt handling http://www.xml.com/ldd/chapter/book/ch09.html
 
Read May 06, 2009, 12:09:51 PM #2
brady

Re: using the AIC on the 9260S

And now the true depth of my ignorance begins to shine through. How exactly does one use the SPI driver from the kernel?  Shouldn't there be a /dev/spidevM.N device in order to use this driver (there are no spi devices in /dev)? 
 
Read May 06, 2009, 12:20:29 PM #3
admin

Re: using the AIC on the 9260S

http://marc.info/?l=linux-arm&m=119747387515397&w=2
 
Read May 06, 2009, 03:00:22 PM #4
brady

Re: using the AIC on the 9260S

Unfortunately I need this board to work as an SPI slave, which I think means I need to write a driver as SPI slave mode is not yet supported in linux.  Thanks for all the help!
-b.
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re