<?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 SPI driver problem in LPC546xx in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899709#M36133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I want to connect serial flash IC&amp;nbsp;AT45DB641E to flexcomm interface 9 of LPC54608 development board OM13092. I am trying to read device ID of&amp;nbsp;&lt;SPAN&gt;AT45DB641E which is 0x100&lt;STRONG&gt;281F&lt;/STRONG&gt; but i am getting 0x&lt;STRONG&gt;281F&lt;/STRONG&gt;FFFF. I think that only two bytes is getting received properly(0x281F). I have used pin 9 as sck, pin 11 as MISO, pin 13 as MOSI and pin 15 as ssel of J9 of development board. I have attached the code and the screen shot of the connection with &lt;SPAN&gt;AT45DB641E.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Please help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks and best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Prasanna&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 May 2019 12:04:40 GMT</pubDate>
    <dc:creator>prasannanaik</dc:creator>
    <dc:date>2019-05-18T12:04:40Z</dc:date>
    <item>
      <title>SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899709#M36133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I want to connect serial flash IC&amp;nbsp;AT45DB641E to flexcomm interface 9 of LPC54608 development board OM13092. I am trying to read device ID of&amp;nbsp;&lt;SPAN&gt;AT45DB641E which is 0x100&lt;STRONG&gt;281F&lt;/STRONG&gt; but i am getting 0x&lt;STRONG&gt;281F&lt;/STRONG&gt;FFFF. I think that only two bytes is getting received properly(0x281F). I have used pin 9 as sck, pin 11 as MISO, pin 13 as MOSI and pin 15 as ssel of J9 of development board. I have attached the code and the screen shot of the connection with &lt;SPAN&gt;AT45DB641E.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Please help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks and best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Prasanna&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2019 12:04:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899709#M36133</guid>
      <dc:creator>prasannanaik</dc:creator>
      <dc:date>2019-05-18T12:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899710#M36134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="328626" data-username="prasannanaik" href="https://community.nxp.com/people/prasannanaik"&gt;Prasanna Naik&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the interrupt function of your project,&amp;nbsp; "SPI_ReadData()" only can read 16 bits(2 bytes),&lt;/P&gt;&lt;P&gt;so you only read 0x281F. I recommend you use the function of "SPI_MasterTransferNonBlocking()" to&amp;nbsp; read ID .&lt;/P&gt;&lt;P&gt;I haven't find the better demo under LPC54608 SDK package, while there is a one under LPC54114 SDK, you can&lt;/P&gt;&lt;P&gt;have a look：&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/83425i43C63C0B7CABE1CD/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;"spi_interrupt_flash" is interrupt project, use "SPI_MasterTransferNonBlocking()", "spi_polling_flash" is polling read the external flash data, use "SPI_MasterTransferBlocking()" function. The same function can find in LPC54608.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 08:40:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899710#M36134</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-05-21T08:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899711#M36135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your input. I will try it and let you know. Meanwhile i had following observations while debugging&amp;nbsp;my code:&lt;/P&gt;&lt;P&gt;1) I should get only 5 interrupt, 1 for "SPITransmit(1, (uint8_t*)&amp;amp;uc_ReadDeviceID_Opcode);" and 4 for "SPIReceive(4, (uint8_t*)&amp;amp;ulDeviceID);" but i am getting 7 interrupt.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) The 7 interrupt result data is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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/83884i046915F8BE13B802/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;&lt;/P&gt;&lt;P&gt;So the bytes 1,0,28,1f are getting received but it is taking two more spi clock automatically even when i am not sending dummy bytes in those two bytes. Please help in understanding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 11:00:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899711#M36135</guid>
      <dc:creator>prasannanaik</dc:creator>
      <dc:date>2019-05-27T11:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899712#M36136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/Alice_Yang"&gt;Alice_Yang&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I have tried the Non blocking transfer method as suggested by you. Now i am able to read the flash ID(i.e 0x100281F) but i am unable to write the data in flash. I am trying to write some data into a page of the flash but while reading the data from that address i am getting 0xFF. What could be the problem. I am unable to attach my latest code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2019 11:32:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899712#M36136</guid>
      <dc:creator>prasannanaik</dc:creator>
      <dc:date>2019-05-31T11:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899713#M36137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prasanna,&lt;/P&gt;&lt;P&gt;I'm not sure the reason.&amp;nbsp; Please check the sector size of your flash, whether the address you write is suitable.&lt;/P&gt;&lt;P&gt;And whether you erase the sector before write.&amp;nbsp; Please check your code with datasheet of your flash and the demo&lt;/P&gt;&lt;P&gt;I mentioned before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 07:42:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899713#M36137</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-06-03T07:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899714#M36138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/Alice_Yang"&gt;Alice_Yang&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I found the root cause of the issue. The chip select(CS) line "P3_30-FC9_SSELn0" is not deasserted properly by the spi engine. The CS line gets asserted on first function call "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SPI_MasterTransferNonBlocking()&lt;/SPAN&gt;" but it remains asserted throughout and doesn't change state. When i explicitly configured CS pin as gpio and operated as per the requirement, the system worked.&lt;/P&gt;&lt;P&gt;Why is this deassertion of CS line not happening properly i dont know.&lt;/P&gt;&lt;P&gt;Do you have any idea?.&lt;/P&gt;&lt;P&gt;Also, is there any problem if i configured the SS line as gpio?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 11:36:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899714#M36138</guid>
      <dc:creator>prasannanaik</dc:creator>
      <dc:date>2019-06-03T11:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: SPI driver problem in LPC546xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899715#M36139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prasanna,&lt;/P&gt;&lt;P&gt;There is no problem configure the SS line to gpio, and I think using gpio to control SPI slave is more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2019 07:46:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-driver-problem-in-LPC546xx/m-p/899715#M36139</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-06-05T07:46:56Z</dc:date>
    </item>
  </channel>
</rss>

