<?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 LPC54102 SPI Master clocking out extra byte in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-SPI-Master-clocking-out-extra-byte/m-p/714658#M28869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Chip_SPIM_XferHandler(), similar to periph_spi_sm_int project, for a read function. &amp;nbsp;My example clocks out 6 bytes, then clocks in 2 bytes (for a total of 8 bytes). &amp;nbsp;Works fine @ 1 MHz. &amp;nbsp;When I increase the clock rate to 4 MHz, after clocking the correct number of bytes (8), I see a de-assert, assert, 1 more byte clocked, then a final de-assert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something about the interaction of the&amp;nbsp;SPIMASTERIRQHANDLER(void) and the handling of tx and rx counts in Chip_SPIM_XferHandler()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone see any issues like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enabling the same interrupts and options as the demo code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chip_SPI_EnableInts(LPC_SPIMASTERPORT,&lt;BR /&gt; (&lt;BR /&gt; SPI_INTENSET_RXDYEN |&lt;BR /&gt; SPI_INTENSET_RXOVEN |&lt;BR /&gt; SPI_INTENSET_TXUREN |&lt;BR /&gt;SPI_INTENSET_SSAEN |&lt;BR /&gt;SPI_INTENSET_SSDEN |&lt;BR /&gt; 0&lt;BR /&gt; ));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Setup master transfer options - 8 data bits per transfer, EOT, EOF */&lt;BR /&gt; spiMasterXfer.options =&lt;BR /&gt; SPIM_XFER_OPTION_SIZE(8) | /* This must be enabled as a minimum, use 8 data bits */&lt;BR /&gt; SPIM_XFER_OPTION_EOT | /* Enable this to assert and deassert SSEL for each individual byte/word */&lt;BR /&gt; SPIM_XFER_OPTION_EOF | /* Insert a delay between bytes/words as defined by frame delay time */&lt;BR /&gt; 0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2017 23:07:48 GMT</pubDate>
    <dc:creator>chrisoneill</dc:creator>
    <dc:date>2017-09-26T23:07:48Z</dc:date>
    <item>
      <title>LPC54102 SPI Master clocking out extra byte</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-SPI-Master-clocking-out-extra-byte/m-p/714658#M28869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Chip_SPIM_XferHandler(), similar to periph_spi_sm_int project, for a read function. &amp;nbsp;My example clocks out 6 bytes, then clocks in 2 bytes (for a total of 8 bytes). &amp;nbsp;Works fine @ 1 MHz. &amp;nbsp;When I increase the clock rate to 4 MHz, after clocking the correct number of bytes (8), I see a de-assert, assert, 1 more byte clocked, then a final de-assert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something about the interaction of the&amp;nbsp;SPIMASTERIRQHANDLER(void) and the handling of tx and rx counts in Chip_SPIM_XferHandler()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone see any issues like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enabling the same interrupts and options as the demo code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chip_SPI_EnableInts(LPC_SPIMASTERPORT,&lt;BR /&gt; (&lt;BR /&gt; SPI_INTENSET_RXDYEN |&lt;BR /&gt; SPI_INTENSET_RXOVEN |&lt;BR /&gt; SPI_INTENSET_TXUREN |&lt;BR /&gt;SPI_INTENSET_SSAEN |&lt;BR /&gt;SPI_INTENSET_SSDEN |&lt;BR /&gt; 0&lt;BR /&gt; ));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Setup master transfer options - 8 data bits per transfer, EOT, EOF */&lt;BR /&gt; spiMasterXfer.options =&lt;BR /&gt; SPIM_XFER_OPTION_SIZE(8) | /* This must be enabled as a minimum, use 8 data bits */&lt;BR /&gt; SPIM_XFER_OPTION_EOT | /* Enable this to assert and deassert SSEL for each individual byte/word */&lt;BR /&gt; SPIM_XFER_OPTION_EOF | /* Insert a delay between bytes/words as defined by frame delay time */&lt;BR /&gt; 0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 23:07:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-SPI-Master-clocking-out-extra-byte/m-p/714658#M28869</guid>
      <dc:creator>chrisoneill</dc:creator>
      <dc:date>2017-09-26T23:07:48Z</dc:date>
    </item>
  </channel>
</rss>

