<?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中的主题 SPI SST25VF016B</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-SST25VF016B/m-p/1095849#M41983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 0px 0px 1rem;"&gt;Hi, i'm writing a library to handle the&amp;nbsp;SST25VF016B data flash unit for the land tiger LPC1768.&lt;SPAN&gt;&amp;nbsp;&lt;A href="http://ww1.microchip.com/downloads/en/DeviceDoc/20005044C.pdf"&gt;Datasheet&lt;/A&gt; &lt;/SPAN&gt;for the chip&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;So far I've written this code:&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/9ptxn"&gt;SPI.h&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/5q4j5"&gt;SPI.c&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/u9dy3"&gt;DataFlash.h&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/jhg4c"&gt;DataFlash.c&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Then in order to test it&amp;nbsp;I wrote a function to read the memory (0x80 bytes) and display it on the LCD; also I mapped erase and write a byte to the land tiger keys... Nothing special I just call the library functions.&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;My porblem is that this code work only sometimes. Like for example if it manages to write data to the LCD if I write a byte sometimes it works and sometimes if just freeze&amp;nbsp;on the status register busy check as the SPI_Transfer(0xFF) to read the status register returns 0xFF (this happens also with other functions).&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Now after trying to write a byte the device won't pass DF_ChipUnlock() as on DF_Init(false) it passes the first loop to check for 0x1C (block protection on startup) but after that when it enter the method DF_ChipUnlock() it freezes there, as&amp;nbsp;DF_EnableWriteStatusRegister(); DF_WriteStatusRegister(0x0); won't work (the status register always reads 0x1C (all sectors protected)).&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Am I missing something?&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2020 14:25:28 GMT</pubDate>
    <dc:creator>peppa</dc:creator>
    <dc:date>2020-04-14T14:25:28Z</dc:date>
    <item>
      <title>SPI SST25VF016B</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-SST25VF016B/m-p/1095849#M41983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 0px 0px 1rem;"&gt;Hi, i'm writing a library to handle the&amp;nbsp;SST25VF016B data flash unit for the land tiger LPC1768.&lt;SPAN&gt;&amp;nbsp;&lt;A href="http://ww1.microchip.com/downloads/en/DeviceDoc/20005044C.pdf"&gt;Datasheet&lt;/A&gt; &lt;/SPAN&gt;for the chip&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;So far I've written this code:&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/9ptxn"&gt;SPI.h&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/5q4j5"&gt;SPI.c&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/u9dy3"&gt;DataFlash.h&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333e48; background-color: #ffffff; font-size: 20px; margin: 1.5em 0px 1rem;"&gt;&lt;A href="https://ghostbin.co/paste/jhg4c"&gt;DataFlash.c&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Then in order to test it&amp;nbsp;I wrote a function to read the memory (0x80 bytes) and display it on the LCD; also I mapped erase and write a byte to the land tiger keys... Nothing special I just call the library functions.&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;My porblem is that this code work only sometimes. Like for example if it manages to write data to the LCD if I write a byte sometimes it works and sometimes if just freeze&amp;nbsp;on the status register busy check as the SPI_Transfer(0xFF) to read the status register returns 0xFF (this happens also with other functions).&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Now after trying to write a byte the device won't pass DF_ChipUnlock() as on DF_Init(false) it passes the first loop to check for 0x1C (block protection on startup) but after that when it enter the method DF_ChipUnlock() it freezes there, as&amp;nbsp;DF_EnableWriteStatusRegister(); DF_WriteStatusRegister(0x0); won't work (the status register always reads 0x1C (all sectors protected)).&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Am I missing something?&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;&lt;/P&gt;&lt;P style="margin: 1.5em 0px 1rem;"&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2020 14:25:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-SST25VF016B/m-p/1095849#M41983</guid>
      <dc:creator>peppa</dc:creator>
      <dc:date>2020-04-14T14:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPI SST25VF016B</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-SST25VF016B/m-p/1095850#M41984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case you have this problem, I've solved it by setting the PINMODE like it follows:&lt;/P&gt;&lt;P&gt;LPC_PINCON-&amp;gt;PINMODE1 |= (3&amp;lt;&amp;lt;2) | (3&amp;lt;&amp;lt;4);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 14:24:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPI-SST25VF016B/m-p/1095850#M41984</guid>
      <dc:creator>peppa</dc:creator>
      <dc:date>2020-04-16T14:24:55Z</dc:date>
    </item>
  </channel>
</rss>

