<?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>LPC Microcontrollers中的主题 Re: Reversing bits in SGPIO output</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579121#M19962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Mon Sep 17 07:02:49 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I understand you are out of luck and there is no way to reverse the bit order in the SGPIO.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The User Manual agrees (SGPIO General Description):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;– The bit order is optimized for MSB first. Interfaces that require LSB first should use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; a software instruction (RBIT) to reverse the bit order (not supported by the ARM Cortex-M0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, this is the wrong way around, since you shift the bits into the MSB, the first bit ends up as the LSB once you are done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried all the tricks for reversing the bit order in a fast way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Search for "bit twiddling hacks".)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:04:23 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:04:23Z</dc:date>
    <item>
      <title>Reversing bits in SGPIO output</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579120#M19961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JohnR on Mon Sep 17 06:08:30 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on AN11201.pdf as mentioned in an earlier post, I am reading the outuput of a SPI ADC connected to the SGPIO input of a Diolan 4350 board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With M4 receiving the data, I can use __RBIT to get the endianness correct, but I want to use M0 to collect the data, leaving M4 for data processing etc. For some reason __RBIT is not implemented for M0 and I have to do the conversion in software which is really slowing up the system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way in the SGPIO system of reversing the bit output from the REG or REG_SS registers, I have looked at the schematic in Figure 32 of the manual and there does not seem any easy way of doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:04:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579120#M19961</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reversing bits in SGPIO output</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579121#M19962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Mon Sep 17 07:02:49 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I understand you are out of luck and there is no way to reverse the bit order in the SGPIO.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The User Manual agrees (SGPIO General Description):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;– The bit order is optimized for MSB first. Interfaces that require LSB first should use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; a software instruction (RBIT) to reverse the bit order (not supported by the ARM Cortex-M0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, this is the wrong way around, since you shift the bits into the MSB, the first bit ends up as the LSB once you are done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried all the tricks for reversing the bit order in a fast way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Search for "bit twiddling hacks".)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:04:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579121#M19962</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reversing bits in SGPIO output</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579122#M19963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JohnR on Mon Sep 17 08:55:56 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for the reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I have looked and tested a number of software reversal methods from the Web but, of course, they work but are all much slower than the M3's (1 cycle) __RBIT macro.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is strange that they would implement the other three reversal methods but not __RBIT.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:04:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reversing-bits-in-SGPIO-output/m-p/579122#M19963</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:04:24Z</dc:date>
    </item>
  </channel>
</rss>

