[meta-xilinx] SPI problem
mike.looijmans at topic.nl
Wed May 10 22:24:40 PDT 2017
On 10-05-17 15:23, Nathan Rossi wrote:
> On 10 May 2017 at 17:18, Arno Steffens <star at gmx.li> wrote:
>> Thanks Mike for the feedback.
>> It is an OnSemi Phyton camera chip.
>> Unfortunately FPGA is not suitable solution for me. The layout is already fixed and I am not an FPGA expert.
>> Checking the SPI registers in Technical Manual: it seems that there is no separate setting for CPOL/CPH for MOSI and MISO.
>> The only way I see is to send address, keep CS low, change SPI mode, read.
>> But there is another limitation. In struct spi_ioc_transfer there is a setting: bits_per_word. I need 10 for doing that
>> as described for the first part (9 bit adress + 1 r/w bit). This returns an error "could not transmit data". Any value expect 8 is returning an error.
>> Is this a limitation by hardware or an issue in driver, which can be fixed?
> For the Zynq PS SPI controllers there is a hard limit to 8-bit words
> (kernel driver advertises this here:
> If you need 10b words and you do not want to do it with an FPGA
> device, you can always use the kernels spi-bitbang module. But this is
> likely only good for low bandwidth control SPI, so if you are using
> SPI to pull image data from the camera this is probably not what you
> want. Also you could easily modify the spi-bitbang module to handle
> this CPOL inversion, such that it always samples MISO on the falling
Camera chips usually only use the SPI interface for configuration, so I'd go
with Nathan's suggestion and use Linux' bit-bang SPI controller for setting
camera parameters and such. Let the kernel pinmix the pins as GPIO and assign
them via devicetree to the bitbang controller.
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans at topicproducts.com
Please consider the environment before printing this e-mail
Join our presentation at Electronics & Applications 2017:
FPGA for real-time data processing, subject “Hardware platform for industrial ultrasound steel plate Inspection” Topic Embedded Systems - Herman Kuster, 1st June 10 AM
Visit http://eabeurs.nl/author/612884/ for more information
More information about the meta-xilinx