Fast GPIO access

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

Fast GPIO access

Postby system_link » Thu Dec 03, 2015 12:49 pm

Hello! I have the question regarding speed of access to GPIO pins for read/write operations. I plan to connect FPGA with ADC to Wandboard and use it for SDR system, but the parallel input through GPIO port is very slow. I tried using mman function to access GPIO from memory, and tried writing linux kernel module for access to GPIO directly, but then I try generate clock at pin (continues change from 0 to 1 without any sleep), I get frequency 700 kHz maximum. It's very slow for my task.
Unfortunately EIM interface not route to EDM, and I not have another way to connect FPGA.
Maybe I make error, and access speed can be higher? Can anybody have answer for my question?
Thank you!
system_link
 
Posts: 4
Joined: Thu Dec 03, 2015 12:38 pm

Re: Fast GPIO access

Postby jury093 » Fri Dec 04, 2015 3:41 pm

system_link wrote:but then I try generate clock at pin (continues change from 0 to 1 without any sleep), I get frequency 700 kHz maximum.

yes. for program gpio access you speed is "normal". may be a bit more if use direct register control across mmap..

Unfortunately EIM interface not route to EDM, and I not have another way to connect FPGA.

try use SPI interface - from RefMan:
Code: Select all
Chapter 21 Enhanced Configurable SPI (ECSPI)
Max operation frequency up to the reference clock frequency.

imho, very simple serial interface - 4 wires between SPI imx6 and any 4 i/o pins FPGA (be carefull about voltage)
jury093
 
Posts: 59
Joined: Fri Feb 06, 2015 10:41 am
Location: Sankt-Peterburg, Russia

Re: Fast GPIO access

Postby system_link » Fri Dec 04, 2015 6:31 pm

I write, that try use mmap and get 700 khz.
Use SPI is slow for my task, because for get 16 bit with SPI speed 25 MHz I get sample rate near 1.5 MHz, but I need 5 MHz minimum.
Maybe GPMI NANDF interface can help me. Is anybody use this interface for get data from external memory?
system_link
 
Posts: 4
Joined: Thu Dec 03, 2015 12:38 pm

Re: Fast GPIO access

Postby jury093 » Fri Dec 04, 2015 7:33 pm

system_link wrote:Maybe GPMI NANDF interface can help me. Is anybody use this interface for get data from external memory?

if you can emulate NAND protocol on FPGA (device mode) or rewrite freescale nand.c driver for you data format - why not. but very hard..
imx6 - media ARM and have no fast parallel interface (except EIM)..
jury093
 
Posts: 59
Joined: Fri Feb 06, 2015 10:41 am
Location: Sankt-Peterburg, Russia

Re: Fast GPIO access

Postby system_link » Fri Dec 04, 2015 7:53 pm

Ok, but I can't find info about how access nand flash driver via QT application, and it's big problem.
system_link
 
Posts: 4
Joined: Thu Dec 03, 2015 12:38 pm

Re: Fast GPIO access

Postby jury093 » Fri Dec 04, 2015 8:25 pm

system_link wrote:Ok, but I can't find info about how access nand flash driver via QT application, and it's big problem.

nand-chip->nandif-arm->nand-driver.c->/dev/mtd
may be you can make modification at nand-driver.c for read data from nandif (fpga data) and put to two buffers with emulation mtd access - f.e /dev/mtd0 and /dev/mtd1
1. to mtd0 put data from fpga, you QT app fast read mtd1
2. mtd1 - fpga, mtd0 - QT app
3. goto 3
my programmer skill very low, sorry :)
jury093
 
Posts: 59
Joined: Fri Feb 06, 2015 10:41 am
Location: Sankt-Peterburg, Russia

Re: Fast GPIO access

Postby system_link » Sat Dec 05, 2015 6:09 am

Thank you for recomendation. I try this way )
system_link
 
Posts: 4
Joined: Thu Dec 03, 2015 12:38 pm


Return to Hardware and peripherals

Who is online

Users browsing this forum: Baidu [Spider] and 12 guests