<?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 Controlling FlexIO parallel transfer in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Controlling-FlexIO-parallel-transfer/m-p/1622106#M24266</link>
    <description>&lt;P&gt;I'm using FLEXIO2 to shift out 4-bit values.&amp;nbsp; &amp;nbsp;I'm using MCUXpresso and SDK version 2.13.0 with iMXRT1060-EVKB&lt;/P&gt;&lt;P&gt;I've been able to get 4-bit values to shift out using a test case.&amp;nbsp; &amp;nbsp;The test has all shifters (SHIFT 7-0) chained together and DMA transfers 32 bytes per access (filling all 8 Shiftbufs).&amp;nbsp; The upper 8 bits of the Timer CMP register are set to 127 (since there are 8 "4-bit items" per 32-bit word and 8 words fetched).&amp;nbsp; The trigger is set as Shifter7.&amp;nbsp; If I set the major loop to 3, then 384 4-bit values are shifted out and the shifter stops (as expected).&lt;/P&gt;&lt;P&gt;But I haven't been able scale this to my needs...&amp;nbsp; My application needs to shift 133 4-bit values from one location, then shift another set of 133 from a different location, etc.&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;133 4-bit values requires 16+ 32-bit words, so I rounded the buffer size up to 18 32-bit words.&amp;nbsp; &amp;nbsp;Since the DMA is programmed as minor/major loops, I decided to make the minor fetch access 2 32-bit words, so the major loop is executed 9 times.&amp;nbsp; &amp;nbsp;Since the minor loop is 2 32-bit words, I only enabled FlexIO shifters 1 and 0. and set the trigger from shifter 1.&lt;/P&gt;&lt;P&gt;However, this doesn't produce the desired result.&amp;nbsp; &amp;nbsp; &amp;nbsp; So I changed the FlexIO shifter/buffer to use all 8 shifters chained together, and this still didn't work.&lt;/P&gt;&lt;P&gt;If I set things up similar to the test case, the 4-bit values come out, but I can't stop at 133 values.&lt;/P&gt;&lt;P&gt;Some questions:&lt;/P&gt;&lt;P&gt;1) (CMP[15:8] +1)/2 is the number of "bits" per word in the documentation.&amp;nbsp; &amp;nbsp;But it seems that it is really the number of shift items per DMA (minor) fetch?&lt;/P&gt;&lt;P&gt;2) Should the number of shifter/shiftbuf registers chained together match the size of the DMA (minor) fetch?&amp;nbsp; &amp;nbsp;Or do they operate independently?&amp;nbsp; (ie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) It seems that controlling the number of shifts is a combination of the CMP value and the number of minor/major DMA fetches...&amp;nbsp; &amp;nbsp;Is there a better way to control the number of items shifted out of FlexIO?&lt;/P&gt;&lt;P&gt;4) How can you determine when the shifting has completed (so a new address can be loaded and the shifting restarted)?&amp;nbsp; &amp;nbsp;I see both shift and DMA interrupts, but when watching on a logic analyzer, they don't appear at the end of shifting...&amp;nbsp; &amp;nbsp; Is there some other interrupt that can be raised when the shifting has completed?&lt;/P&gt;&lt;P&gt;5) Is there a better way to do this?&lt;/P&gt;&lt;P&gt;6) Another version of my application requires 32-bit values be shifted out.&amp;nbsp; &amp;nbsp;I know how to expand the buffers/pins to provide the 32-bit data, but that uses all of the available pins that FLEXIO2 has allocated.&amp;nbsp; Is there a way to route the Timer output to some different pin (for a clock)?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 01:41:23 GMT</pubDate>
    <dc:creator>CktDesigner</dc:creator>
    <dc:date>2023-03-27T01:41:23Z</dc:date>
    <item>
      <title>Controlling FlexIO parallel transfer</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Controlling-FlexIO-parallel-transfer/m-p/1622106#M24266</link>
      <description>&lt;P&gt;I'm using FLEXIO2 to shift out 4-bit values.&amp;nbsp; &amp;nbsp;I'm using MCUXpresso and SDK version 2.13.0 with iMXRT1060-EVKB&lt;/P&gt;&lt;P&gt;I've been able to get 4-bit values to shift out using a test case.&amp;nbsp; &amp;nbsp;The test has all shifters (SHIFT 7-0) chained together and DMA transfers 32 bytes per access (filling all 8 Shiftbufs).&amp;nbsp; The upper 8 bits of the Timer CMP register are set to 127 (since there are 8 "4-bit items" per 32-bit word and 8 words fetched).&amp;nbsp; The trigger is set as Shifter7.&amp;nbsp; If I set the major loop to 3, then 384 4-bit values are shifted out and the shifter stops (as expected).&lt;/P&gt;&lt;P&gt;But I haven't been able scale this to my needs...&amp;nbsp; My application needs to shift 133 4-bit values from one location, then shift another set of 133 from a different location, etc.&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;133 4-bit values requires 16+ 32-bit words, so I rounded the buffer size up to 18 32-bit words.&amp;nbsp; &amp;nbsp;Since the DMA is programmed as minor/major loops, I decided to make the minor fetch access 2 32-bit words, so the major loop is executed 9 times.&amp;nbsp; &amp;nbsp;Since the minor loop is 2 32-bit words, I only enabled FlexIO shifters 1 and 0. and set the trigger from shifter 1.&lt;/P&gt;&lt;P&gt;However, this doesn't produce the desired result.&amp;nbsp; &amp;nbsp; &amp;nbsp; So I changed the FlexIO shifter/buffer to use all 8 shifters chained together, and this still didn't work.&lt;/P&gt;&lt;P&gt;If I set things up similar to the test case, the 4-bit values come out, but I can't stop at 133 values.&lt;/P&gt;&lt;P&gt;Some questions:&lt;/P&gt;&lt;P&gt;1) (CMP[15:8] +1)/2 is the number of "bits" per word in the documentation.&amp;nbsp; &amp;nbsp;But it seems that it is really the number of shift items per DMA (minor) fetch?&lt;/P&gt;&lt;P&gt;2) Should the number of shifter/shiftbuf registers chained together match the size of the DMA (minor) fetch?&amp;nbsp; &amp;nbsp;Or do they operate independently?&amp;nbsp; (ie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) It seems that controlling the number of shifts is a combination of the CMP value and the number of minor/major DMA fetches...&amp;nbsp; &amp;nbsp;Is there a better way to control the number of items shifted out of FlexIO?&lt;/P&gt;&lt;P&gt;4) How can you determine when the shifting has completed (so a new address can be loaded and the shifting restarted)?&amp;nbsp; &amp;nbsp;I see both shift and DMA interrupts, but when watching on a logic analyzer, they don't appear at the end of shifting...&amp;nbsp; &amp;nbsp; Is there some other interrupt that can be raised when the shifting has completed?&lt;/P&gt;&lt;P&gt;5) Is there a better way to do this?&lt;/P&gt;&lt;P&gt;6) Another version of my application requires 32-bit values be shifted out.&amp;nbsp; &amp;nbsp;I know how to expand the buffers/pins to provide the 32-bit data, but that uses all of the available pins that FLEXIO2 has allocated.&amp;nbsp; Is there a way to route the Timer output to some different pin (for a clock)?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 01:41:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Controlling-FlexIO-parallel-transfer/m-p/1622106#M24266</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-27T01:41:23Z</dc:date>
    </item>
  </channel>
</rss>

