<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GPIO max frequency ? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766425#M119050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid there is no way to produce fast toggling&lt;/P&gt;&lt;P&gt;in linux, as operating system introduces unpredictable delays.&lt;/P&gt;&lt;P&gt;May be useful to check&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/920894?commentID=920894#comment-920894" title="https://community.nxp.com/message/920894?commentID=920894#comment-920894"&gt;https://community.nxp.com/message/920894?commentID=920894#comment-920894&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jan 2018 11:18:57 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2018-01-05T11:18:57Z</dc:date>
    <item>
      <title>GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766424#M119049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on imx6ul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to generate a very simple clock using gpio pin, I already configured gpios to work in userspace with "export" and I writed a simple program to put gpio HIGH and LOW as fast as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm facing issue during first 20ms, it seems gpio controller has warmup because the frequency generated during this first 20ms is superior than the rest of measure. (c.f. attachment.jpg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is very simple and looks like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gpio_test.c&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdint.h&amp;gt;&lt;BR /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;BR /&gt;#include &amp;lt;time.h&amp;gt;&lt;BR /&gt;&lt;BR /&gt;#include "imx6ul_zaack.h"&lt;BR /&gt;&lt;BR /&gt;#define ESCAPE&amp;nbsp;&amp;nbsp; &amp;nbsp;27&lt;BR /&gt;#define KEY_UP&amp;nbsp;&amp;nbsp; &amp;nbsp;68&lt;BR /&gt;&lt;BR /&gt;int imx6ul_init()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIOExport(PIN_DATA);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIOExport(PIN_CLK);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIODirection(PIN_DATA, OUT);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIODirection(PIN_CLK, OUT);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char **argv)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// initialise μP&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("Starting\n");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;imx6ul_init();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("Initialization done\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int loop = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int c;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;struct timespec start;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;start.tv_nsec = 10000L;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(!loop){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for(c=0; c &amp;lt; 1000; c++)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_set(PIN_DATA);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;nanosleep(&amp;amp;start, NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_clr(PIN_DATA);&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;nanosleep(&amp;amp;start, NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sleep(2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;blink.h&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/* blink.c&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;* Raspberry Pi GPIO example using sysfs interface.&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;* Guillermo A. Amaral B. &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:g@maral.me"&gt;g@maral.me&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;* This file blinks GPIO 4 (P1-07) while reading GPIO 24 (P1_18).&lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;BR /&gt;#include &amp;lt;fcntl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;#define IN&amp;nbsp; 0&lt;BR /&gt;#define OUT 1&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;#define LOW&amp;nbsp; 0&lt;BR /&gt;#define HIGH 1&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;#define PIN_DATA&amp;nbsp; 9&lt;BR /&gt;#define PIN_CLK 1&lt;BR /&gt;&lt;BR /&gt;#define IMX_GPIO_NR(port, index)&amp;nbsp;&amp;nbsp;&amp;nbsp; ((((port)-1)*32)+((index)&amp;amp;31))&lt;BR /&gt;&lt;BR /&gt;static int&lt;BR /&gt;GPIOExport(int pin)&lt;BR /&gt;{&lt;BR /&gt;#define BUFFER_MAX 3&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char buffer[BUFFER_MAX];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ssize_t bytes_written;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int fd;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fd = open("/sys/class/gpio/export", O_WRONLY);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == fd) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to open export for writing!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;write(fd, buffer, bytes_written);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;close(fd);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(0);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;static int&lt;BR /&gt;GPIOUnexport(int pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char buffer[BUFFER_MAX];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ssize_t bytes_written;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int fd;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fd = open("/sys/class/gpio/unexport", O_WRONLY);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == fd) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to open unexport for writing!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;write(fd, buffer, bytes_written);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;close(fd);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(0);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;static int&lt;BR /&gt;GPIODirection(int pin, int dir)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;static const char s_directions_str[]&amp;nbsp; = "in\0out";&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;#define DIRECTION_MAX 35&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char path[DIRECTION_MAX];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int fd;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;snprintf(path, DIRECTION_MAX, "/sys/class/gpio/gpio%d/direction", pin);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fd = open(path, O_WRONLY);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == fd) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to open gpio direction for writing!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == write(fd, &amp;amp;s_directions_str[IN == dir ? 0 : 3], IN == dir ? 2 : 3)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to set direction!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;close(fd);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(0);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;static int&lt;BR /&gt;GPIORead(int pin)&lt;BR /&gt;{&lt;BR /&gt;#define VALUE_MAX 30&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char path[VALUE_MAX];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char value_str[3];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int fd;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;snprintf(path, VALUE_MAX, "/sys/class/gpio/gpio%d/value", pin);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fd = open(path, O_RDONLY);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == fd) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to open gpio value for reading!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == read(fd, value_str, 3)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to read value!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;close(fd);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(atoi(value_str));&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;static int&lt;BR /&gt;GPIOWrite(int pin, int value)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;static const char s_values_str[] = "01";&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;char path[VALUE_MAX];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int fd;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;snprintf(path, VALUE_MAX, "/sys/class/gpio/gpio%d/value", pin);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fd = open(path, O_WRONLY);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (-1 == fd) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to open gpio value for writing!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (1 != write(fd, &amp;amp;s_values_str[LOW == value ? 0 : 1], 1)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fprintf(stderr, "Failed to write value!\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(-1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;close(fd);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;static int gpio_clr(int pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIOWrite(pin, LOW);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;static int gpio_set(int pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIOWrite(pin, HIGH);&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;static int gpio_fsel(int pin, int direction)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;GPIODirection(pin, direction);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;static int gpio_lev(int pin)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return GPIORead(pin);&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one know why the frequency is different ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 10:01:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766424#M119049</guid>
      <dc:creator>lucviala</dc:creator>
      <dc:date>2018-01-05T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766425#M119050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid there is no way to produce fast toggling&lt;/P&gt;&lt;P&gt;in linux, as operating system introduces unpredictable delays.&lt;/P&gt;&lt;P&gt;May be useful to check&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/920894?commentID=920894#comment-920894" title="https://community.nxp.com/message/920894?commentID=920894#comment-920894"&gt;https://community.nxp.com/message/920894?commentID=920894#comment-920894&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 11:18:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766425#M119050</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-01-05T11:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766426#M119051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you can try is to write to to the GPIO registers directly via memory map, instead of using the sysfs entries. This way you should have considerably less overhead and by that also be a little bit more deterministic.&lt;/P&gt;&lt;P&gt;However, this method is quite dirty and you should take care that nothing else (not even the kernel) is accessing the same register while you're messing around with it.&lt;/P&gt;&lt;P&gt;OpenOCD is doing it that way for example when bit-banging JTAG/SWD with GPIOs:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://repo.or.cz/openocd.git/blob/HEAD:/src/jtag/drivers/imx_gpio.c" title="http://repo.or.cz/openocd.git/blob/HEAD:/src/jtag/drivers/imx_gpio.c"&gt;Public Git Hosting - openocd.git/blob - src/jtag/drivers/imx_gpio.c&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 12:29:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766426#M119051</guid>
      <dc:creator>JohnDoe1z</dc:creator>
      <dc:date>2018-01-05T12:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766427#M119052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For one or the other "blinky" job it might be better to configure a PWM pin. It can be configured upfront and when it's needed it can be enabled. That's for sure more deterministic than a software controlled GPIO toggling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 11:08:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766427#M119052</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2018-01-08T11:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766428#M119053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is interesting, I will try this way.&lt;/P&gt;&lt;P&gt;I have to implement bitbanging i2c-like protocol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 10:44:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766428#M119053</guid>
      <dc:creator>lucviala</dc:creator>
      <dc:date>2018-01-12T10:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766429#M119054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For such protocols I would go with a Kernel driver, doing this from user space with GPIO bitbanging could be difficult.&lt;/P&gt;&lt;P&gt;Most bi-directional bus protocols contain some time constraints and timeouts which can be hard to fulfil from user space.&lt;/P&gt;&lt;P&gt;Maybe you find an already existing Kernel driver for something like that, which you can simply modify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 08:58:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766429#M119054</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2018-01-25T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO max frequency ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766430#M119055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe i2c-gpio Kernel driver will match for my sensor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2018 16:08:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-max-frequency/m-p/766430#M119055</guid>
      <dc:creator>lucviala</dc:creator>
      <dc:date>2018-01-26T16:08:10Z</dc:date>
    </item>
  </channel>
</rss>

