<?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>MQX Software Solutions中的主题 Interrupt pipe queue header is getting NULL</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupt-pipe-queue-header-is-getting-NULL/m-p/726207#M17634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: white; background-repeat: initial; background-size: initial; background-clip: initial; background-attachment: initial; font-size: small; font-family: Arial,sans-serif; background-image: initial; background-origin: initial; background-position: initial;"&gt;Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; background-repeat: initial; background-size: initial; background-clip: initial; background-attachment: initial; font-size: small; font-family: Arial,sans-serif; background-image: initial; background-origin: initial; background-position: initial;"&gt;Please find my work environment details below. &lt;BR /&gt; &lt;BR /&gt;RTOS : MQX ver4.1 &lt;BR /&gt;MCU: MK70FN1M0VMJ15 &lt;BR /&gt;Hub controller : USB2512 high speed 2-port hub controller and USB3300. &lt;BR /&gt;MCU clock : 140Mhz. &lt;BR /&gt; &lt;BR /&gt;About issue : &lt;BR /&gt; &lt;BR /&gt;I'm using 3 CDC devices with usb hub. &lt;BR /&gt; &lt;BR /&gt;To hub, &lt;BR /&gt;1. When I connected "device A"(cdc device), creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called two times and obtaining Queue Header (QH) successfully. &lt;BR /&gt;2. When I connected " device B" (cdc device) , creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called three times and obtaining Queue Header (QH) successfully. &lt;BR /&gt;3. When I connected " device C" (cdc device) , creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called five times and 4 times I'm getting QH handler successfully. The fifth time it called for adding interrupt pipes I'm getting a NULL handler in QH and due to NULL pointer while writing to it MQX throwing an hard fault exception. &lt;BR /&gt; &lt;BR /&gt;I've attached screen shots for your better understanding. &lt;BR /&gt;Note: &lt;BR /&gt;1. To avoid hard fault, I have modified code which checks QH is Null or not? before writing to it. &lt;BR /&gt;2. "device C" is a WIFI + BLE dongle. &lt;BR /&gt;3. device A and B are testing usb devices. &lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: Arial,sans-serif; font-size: small;"&gt;Please guide me for solving below points.&lt;/SPAN&gt;&lt;BR /&gt;Q1. Why I'm getting null QH handler&amp;nbsp; when adding interrupt 5th time? &lt;BR /&gt;Q2. How many interrupt pipes MQX usb hub support? &lt;BR /&gt;Q3. If QH is nulll, will it make any data lose in USB communication? &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&lt;BR /&gt; &lt;BR /&gt;I'm looking forward to hearing from you soon. &lt;BR /&gt; &lt;BR /&gt;Thanks in advance. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Nov 2017 15:29:37 GMT</pubDate>
    <dc:creator>jinspaul1</dc:creator>
    <dc:date>2017-11-21T15:29:37Z</dc:date>
    <item>
      <title>Interrupt pipe queue header is getting NULL</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupt-pipe-queue-header-is-getting-NULL/m-p/726207#M17634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: white; background-repeat: initial; background-size: initial; background-clip: initial; background-attachment: initial; font-size: small; font-family: Arial,sans-serif; background-image: initial; background-origin: initial; background-position: initial;"&gt;Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; background-repeat: initial; background-size: initial; background-clip: initial; background-attachment: initial; font-size: small; font-family: Arial,sans-serif; background-image: initial; background-origin: initial; background-position: initial;"&gt;Please find my work environment details below. &lt;BR /&gt; &lt;BR /&gt;RTOS : MQX ver4.1 &lt;BR /&gt;MCU: MK70FN1M0VMJ15 &lt;BR /&gt;Hub controller : USB2512 high speed 2-port hub controller and USB3300. &lt;BR /&gt;MCU clock : 140Mhz. &lt;BR /&gt; &lt;BR /&gt;About issue : &lt;BR /&gt; &lt;BR /&gt;I'm using 3 CDC devices with usb hub. &lt;BR /&gt; &lt;BR /&gt;To hub, &lt;BR /&gt;1. When I connected "device A"(cdc device), creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called two times and obtaining Queue Header (QH) successfully. &lt;BR /&gt;2. When I connected " device B" (cdc device) , creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called three times and obtaining Queue Header (QH) successfully. &lt;BR /&gt;3. When I connected " device C" (cdc device) , creating interrupt pipes ( " _usb_ehci_add_interrupt_xfer_to_periodic_list" function in ehci_main.c) called five times and 4 times I'm getting QH handler successfully. The fifth time it called for adding interrupt pipes I'm getting a NULL handler in QH and due to NULL pointer while writing to it MQX throwing an hard fault exception. &lt;BR /&gt; &lt;BR /&gt;I've attached screen shots for your better understanding. &lt;BR /&gt;Note: &lt;BR /&gt;1. To avoid hard fault, I have modified code which checks QH is Null or not? before writing to it. &lt;BR /&gt;2. "device C" is a WIFI + BLE dongle. &lt;BR /&gt;3. device A and B are testing usb devices. &lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: Arial,sans-serif; font-size: small;"&gt;Please guide me for solving below points.&lt;/SPAN&gt;&lt;BR /&gt;Q1. Why I'm getting null QH handler&amp;nbsp; when adding interrupt 5th time? &lt;BR /&gt;Q2. How many interrupt pipes MQX usb hub support? &lt;BR /&gt;Q3. If QH is nulll, will it make any data lose in USB communication? &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&lt;BR /&gt; &lt;BR /&gt;I'm looking forward to hearing from you soon. &lt;BR /&gt; &lt;BR /&gt;Thanks in advance. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 15:29:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupt-pipe-queue-header-is-getting-NULL/m-p/726207#M17634</guid>
      <dc:creator>jinspaul1</dc:creator>
      <dc:date>2017-11-21T15:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt pipe queue header is getting NULL</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupt-pipe-queue-header-is-getting-NULL/m-p/726208#M17635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some configuration parameters in USB stack, so user can achieve smaller USB EHCI footprint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see usb/host/source/include/host_cnfg.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Maximum number of allocated QH descriptors.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** MGCT: &amp;lt;option type="number"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifndef USBCFG_EHCI_MAX_QH_DESCRS&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define USBCFG_EHCI_MAX_QH_DESCRS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (8)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Maximum number of allocated QTD descriptors.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** MGCT: &amp;lt;option type="number"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifndef USBCFG_EHCI_MAX_QTD_DESCRS&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define USBCFG_EHCI_MAX_QTD_DESCRS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (16)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;MAX_QH_DESCRS: set to number of pipes (endpoints) expected for EHCI. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;MAX_QTD_DESCRS: set to number of transfers scheduled in the future.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;One CDC class requiring 3 endpoints (2x RX/TX Bulk Transfer + 1x Interrupt), and you also need 2 for control&amp;nbsp; transfer EP0. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;For your case,&amp;nbsp; CDC+CDC+CDC， you need 3+3+3=11 endpoints. You can set &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;USBCFG_EHCI_MAX_QH_DESCRS to 11 at least.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Please modify them and try it again. And let me know whether it helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;If this post is helpful, please mark correct or helpful, thank you very much&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 08:46:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupt-pipe-queue-header-is-getting-NULL/m-p/726208#M17635</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-11-28T08:46:25Z</dc:date>
    </item>
  </channel>
</rss>

