Using HW SPI ?
Posted: Thu Jun 20, 2013 8:14 am
Hi,
I'm trying to get the hardware SPI working to communicate with an external device (SDR frontend) and somehow doesn't seem to work. (on the zedboard + epiphany)
1) I rebuilt the bitstream following the reference design guide. In addition I also enabled SPI1 and put it on some free MIO pins that are available on pin headers.
2) I rebuilt a kernel and made sure the SPI driver was enabled and that 'spi_dev' was enabled as well so I could access it from userspace
3) I edited the device tree and added an entry for the spi controller and a spi device binding to spi_dev.
4) Rebuilt a SD card boot partition using all of those (I used the previous files for u-boot and the fsbl)
It boots, I can see the spi driver is loaded and bound to the right address for SPI1 0xe0007000 and IRQ 81.
The spidev module also loads properly and creates /dev/spi1.0
However as soon as I try to make an actual transfer, the userspace program just freezes, waiting for an IOCTL that never returns.
Cheers,
Sylvain
I'm trying to get the hardware SPI working to communicate with an external device (SDR frontend) and somehow doesn't seem to work. (on the zedboard + epiphany)
1) I rebuilt the bitstream following the reference design guide. In addition I also enabled SPI1 and put it on some free MIO pins that are available on pin headers.
2) I rebuilt a kernel and made sure the SPI driver was enabled and that 'spi_dev' was enabled as well so I could access it from userspace
3) I edited the device tree and added an entry for the spi controller and a spi device binding to spi_dev.
4) Rebuilt a SD card boot partition using all of those (I used the previous files for u-boot and the fsbl)
It boots, I can see the spi driver is loaded and bound to the right address for SPI1 0xe0007000 and IRQ 81.
The spidev module also loads properly and creates /dev/spi1.0
However as soon as I try to make an actual transfer, the userspace program just freezes, waiting for an IOCTL that never returns.
Cheers,
Sylvain