<?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: Reconfiguring SPI Interface from SPI Mode 2 to SPI Mode 0 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1898138#M56366</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose it is possible to change the master&amp;nbsp; SPI mode, but you have to make sure that the mode changing happens while the master spi is idle.&lt;/P&gt;
&lt;P&gt;1)You have to disable FIFO mode&lt;/P&gt;
&lt;P&gt;2)when the transfer is over, the SPI transfer complete can trigger ISR, in the ISR, you can change the mode(CPOL/CPHA bits).&lt;/P&gt;
&lt;P&gt;Pls have a try&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 07:48:43 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-07-03T07:48:43Z</dc:date>
    <item>
      <title>Reconfiguring SPI Interface from SPI Mode 2 to SPI Mode 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1892181#M56290</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I have a LPC546xx with the Flexcomm defined as SPI Interface. On the SPI interface I have a Master device which works with SPI Mode 2 (capture data at falling edge, default clock polarity High). This device can also work on SPI Mode 1.&lt;/P&gt;&lt;P&gt;On the same SPI Interface I have a Slave device with the CSn connected to the previous Master. This device works with SPI Mode 0.&lt;/P&gt;&lt;P&gt;From a sequence of 3-bytes on the SPI Bus,&amp;nbsp; the Master reads the 1st-byte and enables the CSn for the Slave. Now with the CSn enabled from Master, the Slave device can be addressed. So the question is:&lt;BR /&gt;is possible to reconfigure the SPI Interface from SPI Mode 2(or perhaps 1) to SPI Mode 0 while keeping the SCK and CS from the SPI Interface enabled?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 14:05:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1892181#M56290</guid>
      <dc:creator>BM_ENG</dc:creator>
      <dc:date>2024-06-21T14:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reconfiguring SPI Interface from SPI Mode 2 to SPI Mode 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1892602#M56295</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can you tell us if the SPI of LPC546xx functions as master or slave?&lt;/P&gt;
&lt;P&gt;If the spi of LPC546xx functions as master, it is easy to configure it as mode0 or mode1. After the current transfer has completed, you can reconfigure the CPOL/CPHA bit in the CFG register.&lt;/P&gt;
&lt;P&gt;If the spi of LPC546xx functions as slave, during the /CS is high, you can reconfigure the CPOL/CPHA bit in the CFG register.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 05:35:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1892602#M56295</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-06-24T05:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reconfiguring SPI Interface from SPI Mode 2 to SPI Mode 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1896583#M56338</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;XiangJun Rong for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The SPI works as a Master and it has to send a transfer with 1 byte in Mode 1 and the rest of bytes in Mode 0, then the transfer is completed.&lt;BR /&gt;So the reconfiguration has to happen in the middle of a Transfer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 09:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1896583#M56338</guid>
      <dc:creator>BM_ENG</dc:creator>
      <dc:date>2024-07-01T09:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reconfiguring SPI Interface from SPI Mode 2 to SPI Mode 0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1898138#M56366</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose it is possible to change the master&amp;nbsp; SPI mode, but you have to make sure that the mode changing happens while the master spi is idle.&lt;/P&gt;
&lt;P&gt;1)You have to disable FIFO mode&lt;/P&gt;
&lt;P&gt;2)when the transfer is over, the SPI transfer complete can trigger ISR, in the ISR, you can change the mode(CPOL/CPHA bits).&lt;/P&gt;
&lt;P&gt;Pls have a try&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 07:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reconfiguring-SPI-Interface-from-SPI-Mode-2-to-SPI-Mode-0/m-p/1898138#M56366</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-03T07:48:43Z</dc:date>
    </item>
  </channel>
</rss>

