<?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 fopen(&amp;quot;gpio:read&amp;quot;) disables USB device functionality in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183735#M3019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My application is based on usb/device/examples/cdc/virtual_com. When I call&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;fopen ( "gpio:read", (char_ptr)&amp;amp;gpio_int );&lt;/FONT&gt; with&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;GPIO_PIN_STRUCT gpio_int[] = { BSP_SW1 | GPIO_PIN_IRQ_FALLING | GPIO_PIN_IRQ_RISING, GPIO_LIST_END };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;the usb cdc communication is breaking off.&lt;/P&gt;&lt;P&gt;The behavior is similar as reported by ARQuattr, see &lt;A href="https://community.freescale.com/message/89394#89394" title="https://community.freescale.com/message/89394#89394"&gt;https://community.freescale.com/message/89394#89394&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can exclude RAM / stack space as cause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The usb cdc task is initialized with&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;{ CDC_TASK,&amp;nbsp;&amp;nbsp; cdc_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2*3000L,&amp;nbsp; 7L,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "CDC",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK,&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and the task calling the fopen is configured with value 8L for priority.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use gpio:read together with usb cdc device? Should I use low level ISR for GPIO interrupt handling instead of gpio:read?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2012 18:01:39 GMT</pubDate>
    <dc:creator>Fabi</dc:creator>
    <dc:date>2012-07-27T18:01:39Z</dc:date>
    <item>
      <title>fopen("gpio:read") disables USB device functionality</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183735#M3019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My application is based on usb/device/examples/cdc/virtual_com. When I call&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;fopen ( "gpio:read", (char_ptr)&amp;amp;gpio_int );&lt;/FONT&gt; with&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;GPIO_PIN_STRUCT gpio_int[] = { BSP_SW1 | GPIO_PIN_IRQ_FALLING | GPIO_PIN_IRQ_RISING, GPIO_LIST_END };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;the usb cdc communication is breaking off.&lt;/P&gt;&lt;P&gt;The behavior is similar as reported by ARQuattr, see &lt;A href="https://community.freescale.com/message/89394#89394" title="https://community.freescale.com/message/89394#89394"&gt;https://community.freescale.com/message/89394#89394&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can exclude RAM / stack space as cause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The usb cdc task is initialized with&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;{ CDC_TASK,&amp;nbsp;&amp;nbsp; cdc_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2*3000L,&amp;nbsp; 7L,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "CDC",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK,&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and the task calling the fopen is configured with value 8L for priority.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use gpio:read together with usb cdc device? Should I use low level ISR for GPIO interrupt handling instead of gpio:read?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 18:01:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183735#M3019</guid>
      <dc:creator>Fabi</dc:creator>
      <dc:date>2012-07-27T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: fopen("gpio:read") disables USB device functionality</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183736#M3020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello fabi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder why you are using posix driver gpio, when there's available lwgpio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would test it with lwgpio and report back to us what's the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 18:44:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183736#M3020</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-07-31T18:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: fopen("gpio:read") disables USB device functionality</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183737#M3021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure the exact reason why your CDC driver hangs up, but I do know that the CDC driver requires constant servicing, especially during the first few seconds after connection. Is it possible that one of your higher priority tasks is starving the CDC_TASK? The higher priority tasks need to sleep or block every few msec or the CDC driver will not function properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 02:38:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183737#M3021</guid>
      <dc:creator>timias</dc:creator>
      <dc:date>2012-08-01T02:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: fopen("gpio:read") disables USB device functionality</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183738#M3022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed, too many interrupts from gpio-pin were the cause. This is, if CDC works for long time and gpio:read will be opened (i.e. after delay of some minutes), too. Remark: I defined BSP_SW1 to a pin not having pull-up or pull-down.&lt;/P&gt;&lt;P&gt;I've also migrated to lwgpio, because it seems to need less cpu-power (but I'm not sure). However, lwgpio is fully undocumended in mqxug.pdf and mqxrm.pdf, so I haven't known it before.&lt;/P&gt;&lt;P&gt;So, thank you very much for your hints.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 10:16:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fopen-quot-gpio-read-quot-disables-USB-device-functionality/m-p/183738#M3022</guid>
      <dc:creator>Fabi</dc:creator>
      <dc:date>2012-09-24T10:16:39Z</dc:date>
    </item>
  </channel>
</rss>

