<?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中的主题 LPC55S36 SPI Pin Activity on LPCXpresso55S36 board</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S36-SPI-Pin-Activity-on-LPCXpresso55S36-board/m-p/2018167#M57446</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an LPC55S36 on an Xpresso evaluation board. I have a new requirement: add SPI driver to the software.&amp;nbsp; An SPI driver is therefore being added to an existing project under&amp;nbsp;&lt;SPAN&gt;MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've chosen flexcom2 spi, and specified the following pins for the SPI Port.&amp;nbsp; These will be jumpered off-board to another evaluation board once they work.&amp;nbsp; Pins:&lt;/P&gt;&lt;P&gt;SCL&amp;nbsp; &amp;nbsp; &amp;nbsp;P1-23&amp;nbsp; &amp;nbsp; &amp;nbsp; J122-8&lt;/P&gt;&lt;P&gt;MOSI&amp;nbsp; &amp;nbsp;P0-26&amp;nbsp; &amp;nbsp; J92-9&lt;/P&gt;&lt;P&gt;MISO&amp;nbsp; &amp;nbsp;P1-25&amp;nbsp; &amp;nbsp; &amp;nbsp;J122-12&lt;/P&gt;&lt;P&gt;SSEL0&amp;nbsp; P1-26&amp;nbsp; &amp;nbsp; &amp;nbsp; J122-6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clock into flexcomm2 is 32 MHz.&amp;nbsp; &amp;nbsp;The port is initialized in the peripheral init function.&amp;nbsp; A small test program sends a single string to the port at a 1Hz rate.&amp;nbsp; The test function is here:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;done = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SPI_MasterTransferCreateHandle (SPI_ADS1X2S14_ADC_PERIPHERAL, &amp;amp;spiHandle, &amp;amp;spiDone, NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;txData&lt;/SPAN&gt;&lt;SPAN&gt; = txDataBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;rxData&lt;/SPAN&gt;&lt;SPAN&gt; = rxDataBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;dataSize&lt;/SPAN&gt;&lt;SPAN&gt; = n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;status = &lt;/SPAN&gt;&lt;SPAN&gt;SPI_MasterTransferNonBlocking&lt;/SPAN&gt;&lt;SPAN&gt; (SPI_ADS1X2S14_ADC_PERIPHERAL, &amp;amp;spiHandle, &amp;amp;xfer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt; (!done)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PRINTF (&lt;/SPAN&gt;&lt;SPAN&gt;"Waiting...\r\n"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;usleep (10000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Where &lt;EM&gt;done&lt;/EM&gt; is a volatile. In loopback mode, the test works. The n-byte test string is deposited in the rx buffer and "done" is set to a nonzero value in the callback function "spiDone".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when loopback is turned off and MISO is connected to MOSI,&amp;nbsp;&amp;nbsp;&lt;EM&gt;status&lt;/EM&gt; is 0 (indicating success), &lt;EM&gt;done&lt;/EM&gt; is set (indication completion), the Rx buffer has n values of 0xff (which is &lt;U&gt;not&lt;/U&gt; correct), and a scope shows no activity on the SSEL, CLK, and MOSI pins. In this initial test the pins are floating, having no load other than an oscope probe.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My read of the eval board schematic suggests that there are no conflicts for these pins, and no on-board devices that would be interfering with this test (though I may have overlooked something).&lt;/P&gt;&lt;P&gt;Flexcom setup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRCooper_0-1734810955624.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316940i75F5E60766E37B28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TRCooper_0-1734810955624.png" alt="TRCooper_0-1734810955624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pin routing:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRCooper_1-1734811028579.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316941iF5E5C7A1AE00C94F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TRCooper_1-1734811028579.png" alt="TRCooper_1-1734811028579.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must have omitted something, though I cannot identify what. Below should be the contents of the Analog/Digital I/O control port for PIO1_23, 25, and 26 which show digital mode, function 1 (is this correct?)&lt;/P&gt;&lt;P&gt;0x400010DC 00000101 00000000 ........&lt;BR /&gt;0x400010E4 00000101 00000101 ........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else can I examine?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;TC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Dec 2024 20:08:54 GMT</pubDate>
    <dc:creator>TRCooper</dc:creator>
    <dc:date>2024-12-21T20:08:54Z</dc:date>
    <item>
      <title>LPC55S36 SPI Pin Activity on LPCXpresso55S36 board</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S36-SPI-Pin-Activity-on-LPCXpresso55S36-board/m-p/2018167#M57446</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an LPC55S36 on an Xpresso evaluation board. I have a new requirement: add SPI driver to the software.&amp;nbsp; An SPI driver is therefore being added to an existing project under&amp;nbsp;&lt;SPAN&gt;MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've chosen flexcom2 spi, and specified the following pins for the SPI Port.&amp;nbsp; These will be jumpered off-board to another evaluation board once they work.&amp;nbsp; Pins:&lt;/P&gt;&lt;P&gt;SCL&amp;nbsp; &amp;nbsp; &amp;nbsp;P1-23&amp;nbsp; &amp;nbsp; &amp;nbsp; J122-8&lt;/P&gt;&lt;P&gt;MOSI&amp;nbsp; &amp;nbsp;P0-26&amp;nbsp; &amp;nbsp; J92-9&lt;/P&gt;&lt;P&gt;MISO&amp;nbsp; &amp;nbsp;P1-25&amp;nbsp; &amp;nbsp; &amp;nbsp;J122-12&lt;/P&gt;&lt;P&gt;SSEL0&amp;nbsp; P1-26&amp;nbsp; &amp;nbsp; &amp;nbsp; J122-6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clock into flexcomm2 is 32 MHz.&amp;nbsp; &amp;nbsp;The port is initialized in the peripheral init function.&amp;nbsp; A small test program sends a single string to the port at a 1Hz rate.&amp;nbsp; The test function is here:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;done = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SPI_MasterTransferCreateHandle (SPI_ADS1X2S14_ADC_PERIPHERAL, &amp;amp;spiHandle, &amp;amp;spiDone, NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;txData&lt;/SPAN&gt;&lt;SPAN&gt; = txDataBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;rxData&lt;/SPAN&gt;&lt;SPAN&gt; = rxDataBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;xfer.&lt;/SPAN&gt;&lt;SPAN&gt;dataSize&lt;/SPAN&gt;&lt;SPAN&gt; = n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;status = &lt;/SPAN&gt;&lt;SPAN&gt;SPI_MasterTransferNonBlocking&lt;/SPAN&gt;&lt;SPAN&gt; (SPI_ADS1X2S14_ADC_PERIPHERAL, &amp;amp;spiHandle, &amp;amp;xfer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;while&lt;/SPAN&gt;&lt;SPAN&gt; (!done)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PRINTF (&lt;/SPAN&gt;&lt;SPAN&gt;"Waiting...\r\n"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;usleep (10000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Where &lt;EM&gt;done&lt;/EM&gt; is a volatile. In loopback mode, the test works. The n-byte test string is deposited in the rx buffer and "done" is set to a nonzero value in the callback function "spiDone".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when loopback is turned off and MISO is connected to MOSI,&amp;nbsp;&amp;nbsp;&lt;EM&gt;status&lt;/EM&gt; is 0 (indicating success), &lt;EM&gt;done&lt;/EM&gt; is set (indication completion), the Rx buffer has n values of 0xff (which is &lt;U&gt;not&lt;/U&gt; correct), and a scope shows no activity on the SSEL, CLK, and MOSI pins. In this initial test the pins are floating, having no load other than an oscope probe.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My read of the eval board schematic suggests that there are no conflicts for these pins, and no on-board devices that would be interfering with this test (though I may have overlooked something).&lt;/P&gt;&lt;P&gt;Flexcom setup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRCooper_0-1734810955624.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316940i75F5E60766E37B28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TRCooper_0-1734810955624.png" alt="TRCooper_0-1734810955624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pin routing:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRCooper_1-1734811028579.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316941iF5E5C7A1AE00C94F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TRCooper_1-1734811028579.png" alt="TRCooper_1-1734811028579.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must have omitted something, though I cannot identify what. Below should be the contents of the Analog/Digital I/O control port for PIO1_23, 25, and 26 which show digital mode, function 1 (is this correct?)&lt;/P&gt;&lt;P&gt;0x400010DC 00000101 00000000 ........&lt;BR /&gt;0x400010E4 00000101 00000101 ........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else can I examine?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;TC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2024 20:08:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S36-SPI-Pin-Activity-on-LPCXpresso55S36-board/m-p/2018167#M57446</guid>
      <dc:creator>TRCooper</dc:creator>
      <dc:date>2024-12-21T20:08:54Z</dc:date>
    </item>
  </channel>
</rss>

