<?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: Lpc1796 ssp/ssi in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528944#M1222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri Jan 27 00:32:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what your sensor is expecting &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course chip select is always an issue, but if you switch off SSEL function and use CS via GPIO it could be possible that 2*8bit is working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise you have to extend your SSP receive function to receive 16 bit :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your data register (LPC_SSP1-&amp;gt;DR) is already able to receive correct 16 bit data you could also store them as 2 bytes in your byte buffer with something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
*buf++ = (LPC_SSP1-&amp;gt;DR&amp;gt;&amp;gt;8) &amp;amp; 0x0FF; //store byte 1
*buf++ = (LPC_SSP1-&amp;gt;DR) &amp;amp; 0x0FF;&amp;nbsp;&amp;nbsp;&amp;nbsp; //store byte 2
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:53:44 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:53:44Z</dc:date>
    <item>
      <title>Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528941#M1219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by timer on Thu Jan 26 16:36:24 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to read with SSI (SSP) from an Sensor. With my Oszi I can see the data is comming but I dont find all the 16bits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I this routine with Length = 1 because the I get one clock-"burst" with 16 periodes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void SSP1Receive(uint8_t *buf, uint32_t Length )
{
uint32_t i;

&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=0; i&amp;lt;Length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send a dummy byte, read the result
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SSP1-&amp;gt;DR = 0xFF; // send 0xFF as dummy

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait until the Busy bit is cleared */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ( (LPC_SSP1-&amp;gt;SR &amp;amp; (SSPSR_BSY|SSPSR_RNE)) !=&amp;nbsp; SSPSR_RNE );
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *buf++ = LPC_SSP1-&amp;gt;DR;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; return;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This Code is form the SSP-Example but I get as you may expect only one 8bit value in the buffer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I need 16bit. I try to change the *buf to a uin16_t because I think I have to use the whole accessable DR-Register, but come into the "HardFault_Handler" and had to reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know how I can get the whole 16bits data?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528941#M1219</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528942#M1220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Thu Jan 26 16:49:03 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What's your DSS value?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528942#M1220</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528943#M1221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by timer on Thu Jan 26 23:53:14 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Zero,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the DSS is set to 1111 for 16-bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I could try to put it on 8-bit and change Lenght = 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I have now know time to test it, but, could this work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528943#M1221</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528944#M1222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri Jan 27 00:32:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what your sensor is expecting &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course chip select is always an issue, but if you switch off SSEL function and use CS via GPIO it could be possible that 2*8bit is working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise you have to extend your SSP receive function to receive 16 bit :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your data register (LPC_SSP1-&amp;gt;DR) is already able to receive correct 16 bit data you could also store them as 2 bytes in your byte buffer with something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
*buf++ = (LPC_SSP1-&amp;gt;DR&amp;gt;&amp;gt;8) &amp;amp; 0x0FF; //store byte 1
*buf++ = (LPC_SSP1-&amp;gt;DR) &amp;amp; 0x0FF;&amp;nbsp;&amp;nbsp;&amp;nbsp; //store byte 2
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528944#M1222</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528945#M1223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by timer on Fri Jan 27 05:26:13 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with two times 8-bit I get good looking data. But they are shifted one bit so the first bit should be the even parity, but it don't look like :(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the datasheet from the IC in the Sensor:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://http://www.austriamicrosystems.com/content/view/download/1240"&gt;Datasheet&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528945#M1223</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc1796 ssp/ssi</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528946#M1224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by timer on Fri Jan 27 09:55:39 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a way that it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I use 3 times 6-bit and get all my needed bits out of them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:53:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc1796-ssp-ssi/m-p/528946#M1224</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:53:45Z</dc:date>
    </item>
  </channel>
</rss>

