<?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のトピックUse a GPIO as CS to control SPIFI</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Use-a-GPIO-as-CS-to-control-SPIFI/m-p/1485989#M49505</link>
    <description>&lt;P&gt;Hello, I am working on a dev board(OM13098). My project is to use the on board serial flash (W25Q128JV-DTR) as a mass storage device through USB port. I combined two example projects together. (lpcxpresso54628_dev_msc_ramdisk_bm + lpcxpresso54628_spifi_polling_transfer) modified lpcxpresso54628_dev_msc_ramdisk_bm a bit in order to access SPI flash data&lt;/P&gt;&lt;P&gt;The test code worked OK on dev board for fast_read_qaud_out,&amp;nbsp;fast_read_dual_out, fast_read, and standard_read.&amp;nbsp;I can see the SCLK/CS/MOSI/MISO SPI signals through a logical analyzer.&amp;nbsp;The pin configuration as following:&lt;/P&gt;&lt;P&gt;P0_23:&amp;nbsp;SPIFI_CSN,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_24:&amp;nbsp;SPIFI_IO(0) - MOSI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_25:&amp;nbsp;SPIFI_IO(1) - MISO,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_26:&amp;nbsp;SPIFI_CLK,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_27:&amp;nbsp;SPIFI_IO(3),&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_28:&amp;nbsp;SPIFI_IO(2)&lt;/P&gt;&lt;P&gt;Now I need to port above code to our production board. On the board the main clock is 180MHz(the dev board is 220MHz), there are 4 SPI devices share the same SPI bus. SCLK/MOSI/MISO will be shared, each SPI device has it own CS. Also due to hardware limitation,&amp;nbsp;SPIFI_IO(2:3) are not available to the firmware, I cannot use fast_read_quad_output.&lt;/P&gt;&lt;P&gt;The SPI flash pin configuration changed as following:&lt;/P&gt;&lt;P&gt;P2_14:GPIO output connect to SPI flash /CS pin,&lt;/P&gt;&lt;P&gt;P2_15: GPIO output connect to SPI flash /RESET pin&lt;/P&gt;&lt;P&gt;P3_15&amp;nbsp;FC8_SCK to flash chip CLK pin,&lt;/P&gt;&lt;P&gt;P3_16&amp;nbsp;FC8_RXD_SDA_MOSI to flash chip DI(IO0).&lt;/P&gt;&lt;P&gt;P3_17&amp;nbsp;FC8_TXD_SCL_MISO&amp;nbsp;to flash chip Do(IO1)&lt;/P&gt;&lt;P&gt;In my code, I manually set&amp;nbsp;P2_14 to 0 or 1, before and after write/read flash data, or sendCommands to the flash chip. I can see the /CS signals from logical analyzer. but I cannot see CLK and MOSI signals. MISO seems like repeats&amp;nbsp;/CS signals.&lt;/P&gt;&lt;P&gt;What the possible mistakes I made can cause above issue? can you provide a detail steps from&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. how to set&amp;nbsp;Power: In the AHBCLKCTRL0 register&lt;/P&gt;&lt;P&gt;2. how to set&amp;nbsp;SPIFI clock: set up the SPIFI clock using the SPIFICLKSEL and SPIFICLKDIV&lt;BR /&gt;registers&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;how to set&amp;nbsp;Pins: Select SPIFI pins and pin modes through the relevant IOCON registers&lt;/P&gt;&lt;P&gt;I noticed that /CS(P2_14) does not on the same FlexComm as SCLK/MOSI/MISO(these 3 are on FC8),&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this pin config will work? or I need to change /CS to&amp;nbsp;PIO3_18 FC8_CTS_SDA_SSEL0?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 06:56:55 GMT</pubDate>
    <dc:creator>changlin_ren</dc:creator>
    <dc:date>2022-07-07T06:56:55Z</dc:date>
    <item>
      <title>Use a GPIO as CS to control SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Use-a-GPIO-as-CS-to-control-SPIFI/m-p/1485989#M49505</link>
      <description>&lt;P&gt;Hello, I am working on a dev board(OM13098). My project is to use the on board serial flash (W25Q128JV-DTR) as a mass storage device through USB port. I combined two example projects together. (lpcxpresso54628_dev_msc_ramdisk_bm + lpcxpresso54628_spifi_polling_transfer) modified lpcxpresso54628_dev_msc_ramdisk_bm a bit in order to access SPI flash data&lt;/P&gt;&lt;P&gt;The test code worked OK on dev board for fast_read_qaud_out,&amp;nbsp;fast_read_dual_out, fast_read, and standard_read.&amp;nbsp;I can see the SCLK/CS/MOSI/MISO SPI signals through a logical analyzer.&amp;nbsp;The pin configuration as following:&lt;/P&gt;&lt;P&gt;P0_23:&amp;nbsp;SPIFI_CSN,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_24:&amp;nbsp;SPIFI_IO(0) - MOSI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_25:&amp;nbsp;SPIFI_IO(1) - MISO,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_26:&amp;nbsp;SPIFI_CLK,&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_27:&amp;nbsp;SPIFI_IO(3),&amp;nbsp;&lt;/P&gt;&lt;P&gt;P0_28:&amp;nbsp;SPIFI_IO(2)&lt;/P&gt;&lt;P&gt;Now I need to port above code to our production board. On the board the main clock is 180MHz(the dev board is 220MHz), there are 4 SPI devices share the same SPI bus. SCLK/MOSI/MISO will be shared, each SPI device has it own CS. Also due to hardware limitation,&amp;nbsp;SPIFI_IO(2:3) are not available to the firmware, I cannot use fast_read_quad_output.&lt;/P&gt;&lt;P&gt;The SPI flash pin configuration changed as following:&lt;/P&gt;&lt;P&gt;P2_14:GPIO output connect to SPI flash /CS pin,&lt;/P&gt;&lt;P&gt;P2_15: GPIO output connect to SPI flash /RESET pin&lt;/P&gt;&lt;P&gt;P3_15&amp;nbsp;FC8_SCK to flash chip CLK pin,&lt;/P&gt;&lt;P&gt;P3_16&amp;nbsp;FC8_RXD_SDA_MOSI to flash chip DI(IO0).&lt;/P&gt;&lt;P&gt;P3_17&amp;nbsp;FC8_TXD_SCL_MISO&amp;nbsp;to flash chip Do(IO1)&lt;/P&gt;&lt;P&gt;In my code, I manually set&amp;nbsp;P2_14 to 0 or 1, before and after write/read flash data, or sendCommands to the flash chip. I can see the /CS signals from logical analyzer. but I cannot see CLK and MOSI signals. MISO seems like repeats&amp;nbsp;/CS signals.&lt;/P&gt;&lt;P&gt;What the possible mistakes I made can cause above issue? can you provide a detail steps from&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. how to set&amp;nbsp;Power: In the AHBCLKCTRL0 register&lt;/P&gt;&lt;P&gt;2. how to set&amp;nbsp;SPIFI clock: set up the SPIFI clock using the SPIFICLKSEL and SPIFICLKDIV&lt;BR /&gt;registers&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;how to set&amp;nbsp;Pins: Select SPIFI pins and pin modes through the relevant IOCON registers&lt;/P&gt;&lt;P&gt;I noticed that /CS(P2_14) does not on the same FlexComm as SCLK/MOSI/MISO(these 3 are on FC8),&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this pin config will work? or I need to change /CS to&amp;nbsp;PIO3_18 FC8_CTS_SDA_SSEL0?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 06:56:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Use-a-GPIO-as-CS-to-control-SPIFI/m-p/1485989#M49505</guid>
      <dc:creator>changlin_ren</dc:creator>
      <dc:date>2022-07-07T06:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use a GPIO as CS to control SPIFI</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Use-a-GPIO-as-CS-to-control-SPIFI/m-p/1487379#M49541</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Can not see&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;CLK signal, it meaning the SPIFI doesn't work, recommend you check the SPIFI clock configuration. You can use configuration tool inside MCUXpresso IDE config SPIFI refer to your own board clock and pins, then refer to the generated code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 09:10:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Use-a-GPIO-as-CS-to-control-SPIFI/m-p/1487379#M49541</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-07-11T09:10:21Z</dc:date>
    </item>
  </channel>
</rss>

