<?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: LPC11C24 SPI read not working</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792638#M31899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2018 15:22:41 GMT</pubDate>
    <dc:creator>chrisidema</dc:creator>
    <dc:date>2018-06-27T15:22:41Z</dc:date>
    <item>
      <title>LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792632#M31893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a project where we need SPI.&lt;/P&gt;&lt;P&gt;We have full communication using bitbanging, but we can't get it to work using the peripheral.&lt;/P&gt;&lt;P&gt;On the logic analyser all signals seem to be correct (and identical to bitbanging, except timing), but the read register is empty.&lt;/P&gt;&lt;P&gt;What are we doing wrong?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;void test_spi(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SSP_ConfigFormat ssp_format;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SSP_DATA_SETUP_T xf_setup;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SYSCTL_PeriphReset(RESET_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_GPIO_Init(LPC_GPIO);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO0_9, IOCON_FUNC1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO0_8, IOCON_FUNC1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO2_11, IOCON_FUNC1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//init SSN:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_GPIO_SetPinOutHigh(LPC_GPIO, 0, 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_GPIO_SetPinDIROutput(LPC_GPIO, 0, 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_GPIO_SetPinOutHigh(LPC_GPIO, 0, 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SSP1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SSP_Init(LPC_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SSP_Int_Enable(LPC_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SSP_SetFormat(LPC_SSP0, SSP_BITS_8, SSP_FRAMEFORMAT_SPI,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;SSP_CLOCK_CPHA0_CPOL0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Chip_SSP_Enable(LPC_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; slave_select_set();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; Chip_SSP_SendFrame(LPC_SSP0, 0x28);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; nfc_buffer[0] = Chip_SSP_ReceiveFrame(LPC_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; Chip_SSP_SendFrame(LPC_SSP0, 0x80);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; nfc_buffer[1] = Chip_SSP_ReceiveFrame(LPC_SSP0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; slave_select_clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2018 14:26:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792632#M31893</guid>
      <dc:creator>chrisidema</dc:creator>
      <dc:date>2018-06-18T14:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792633#M31894</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;What's the external SPI device?&lt;/P&gt;&lt;P&gt;Please check if you are following SPI device read sequence.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 06:27:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792633#M31894</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-19T06:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792634#M31895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is the PN532 NFC reader. But &lt;EM&gt;even&lt;/EM&gt; connecting MOSI to MISO gives an empty result.&lt;BR /&gt;Like I said we got it &lt;SPAN style="text-decoration: underline;"&gt;working with bitbanging&lt;/SPAN&gt;, but want to get the spi peripheral working (also for other projects).&lt;BR /&gt;The read sequence may not be correct in this particular snippet, but we &lt;SPAN style="text-decoration: underline;"&gt;should get a result other than 0&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 06:48:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792634#M31895</guid>
      <dc:creator>chrisidema</dc:creator>
      <dc:date>2018-06-19T06:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792635#M31896</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;I would recommend to submit an online support case about PN532 NFC reader product.&lt;/P&gt;&lt;P&gt;There with experienced NFC technical support engineers to support your question.&lt;/P&gt;&lt;P&gt;Please follow below thread to submit a technical case:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-329745"&gt;https://community.nxp.com/docs/DOC-329745&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 03:39:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792635#M31896</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-25T03:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792636#M31897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anybody have experience with SPI on the LPC11C24? A working example would be nice. Preferably one with direct writing to registers so it is independent of libraries.&lt;BR /&gt;&lt;BR /&gt;Ps: I'm on NXP's forum for almost 5 years(including LPC-expresso), but post are still moderated. Weird.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 06:39:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792636#M31897</guid>
      <dc:creator>chrisidema</dc:creator>
      <dc:date>2018-06-25T06:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792637#M31898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a test with the &lt;A href="https://www.nxp.com/support/developer-resources/hardware-development-tools/lpcxpresso-boards/lpcxpresso-board-for-lpc11c24-with-cmsis-dap-probe:OM13093"&gt;OM13093 LPCXpresso board for LPC11C24&lt;/A&gt; using &lt;A href="https://www.nxp.com/support/developer-resources/software-development-tools/lpc-developer-resources-/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX?tab=Design_Tools_Tab"&gt;&amp;lt;lpcopen_v2_00a_keil_iar_nxp_lpcxpresso_11c24&amp;gt; &lt;/A&gt;software package with [periph_ssp] demo.&lt;/P&gt;&lt;P&gt;For I only have one OM13093&amp;nbsp; board on hand, I short connect the LPC11C24 PIO0_8(MISO) &amp;amp; PIO0_9(MOSI) together.&lt;/P&gt;&lt;P&gt;I disable the LOOPBACK_TEST macro definition.&lt;/P&gt;&lt;P&gt;After the demo code run, I could find Rx_Buf array with Tx_Buf array value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62518i54EDFCD321A49CBB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The SPI analyzer also shows the MOSI with the same data of MISO:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/62519i7BDC4FD2E3DC06E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think you could refer this [periph_ssp] demo as a start point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 03:06:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792637#M31898</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-27T03:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11C24 SPI read not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792638#M31899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 15:22:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11C24-SPI-read-not-working/m-p/792638#M31899</guid>
      <dc:creator>chrisidema</dc:creator>
      <dc:date>2018-06-27T15:22:41Z</dc:date>
    </item>
  </channel>
</rss>

