tags:

views:

632

answers:

3

Does anyone ever develop some application to control the spi device on OMAP3? I can load the spi driver "mcspi", but I don't know how to use it.

A: 

I haven't look specifically at this driver, but I would guess it is like any other linux driver. Open() as file system resource and then read() and/or write() data to/from the driver. There is also probably some ioctl() command for setup, i.e. buffer size, spi clock speed.

I would also venture to guess TI has written a user guide for the driver.

simon
A: 

Ok So first I need to apologize for my previous shoot from the hip answer.

I too have now started looking into trying to get the McSPI's working and it has been some what painful. TI does not have lot of documentation, and I still haven;t been successful in getting any of the McSPI's to actually work, yet. But I thought I would post a link to the beagle board google discussion on the subject, as it appears they have been successful at getting at least McSPI3 working on the OMAP3530.

http://groups.google.com/group/beagleboard/browse_thread/thread/15d9488c1ec314ef/5ca06c67ff438106?q=mcspi3#5ca06c67ff438106

simon
A: 

As of at least PSP 3.00.00.04, the mcspi driver is integrated with the Linux spi stack.

Turn on CONFIG_SPI and CONFIG_SPI_OMAP24XX in your kernel

Here's how to use spi devices, in general. http://www.mjmwired.net/kernel/Documentation/spi/spi-summary

There is also the spidev driver, which presents a char device to userspace, but it's experimental.

jauricchio