<?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中的主题 Re: LPCSPFILib v0.06(Beta) available</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576490#M19440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dill on Tue Aug 19 10:13:53 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, the code in the chm is outdated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But there is some code in lpcopen that may help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;applications\lpc18xx_43xx\examples\misc\spifilib_tst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;software\lpcspifilib\test&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;just link those files together and it runs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:17:45 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:17:45Z</dc:date>
    <item>
      <title>LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576488#M19438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_Support on Fri Jun 27 09:42:55 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;New version (v0.06 Beta) of LPCSPIFI library available &lt;/SPAN&gt;&lt;A href="http://http://www.lpcware.com/SPIFI"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576488#M19438</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576489#M19439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mch0 on Tue Aug 19 08:51:56 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;has the library really been tested with the files uploaded?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't believe it. I am keen to use such a library as my board contains a device of a supported family and the board already works so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I can't get even past the first steps, e.g. registering a device. As far as I can see the example in the documentaion does not match the current version and even within the source there seem to be obvious errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are my observations so far:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. The " LPCSPIFILIB library use model" both in the PDF and the HTML doc refers to some previous version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Examples: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a)&amp;nbsp; &lt;/SPAN&gt;&lt;I&gt;spifiInit()&lt;/I&gt;&lt;SPAN&gt; now has two parameters, but is called with one only in the use case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b)&amp;nbsp; pFamilyHandle = spifiRegisterFamily(SPIFI_REG_FAMILY_SpansionS25FLP);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The parameter &lt;/SPAN&gt;&lt;I&gt;SPIFI_REG_FAMILY_SpansionS25FLP&lt;/I&gt;&lt;SPAN&gt; is marked as deprecated already (but works). Not convincing, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The function called (&lt;/SPAN&gt;&lt;I&gt;spifiRegisterFamily()&lt;/I&gt;&lt;SPAN&gt;) in &lt;/SPAN&gt;&lt;I&gt;spifilib_dev_common.c&lt;/I&gt;&lt;SPAN&gt; should return a pointer to the device family linked list but actually returns the status &lt;/SPAN&gt;&lt;I&gt;SPIFI_ERR_NONE&lt;/I&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This breaks the code, as the caller never gets the pointer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have stopped here, since I feel that either I'm completely off track or the supplied sources are severely mixed up. I could have started "fixing" the code, but since nothing seems to match I feel there is something severely mixed up and I better ask what gives?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576489#M19439</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576490#M19440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dill on Tue Aug 19 10:13:53 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, the code in the chm is outdated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But there is some code in lpcopen that may help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;applications\lpc18xx_43xx\examples\misc\spifilib_tst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;software\lpcspifilib\test&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;just link those files together and it runs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576490#M19440</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576491#M19441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mch0 on Tue Aug 19 11:16:03 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Dill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the pointer, found the code you referenced!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all it indeed uses the new API, much better to have a reference now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Second observation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The library code is still broken, but the bug is not triggered by the test code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Reason:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to register a new device (S25FL064P), the test code does not register any device besides the "built in" devices. Since I decided to keep my add-ons clear from the supplied library to avoid any overwrite when the next SPIFI lib arrives, I had to use the return parameter of the register-family function. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, that's where (one) bug is in V 0.6.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The test code never uses the return parameter ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, since I'm now more confident that the files are basically usable I started some fixing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At least I the library now correctly registers and detects my device :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576491#M19441</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576492#M19442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dill on Tue Aug 19 11:53:14 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;very interesting. I've tried this yesterday and had the same issue, but didn't look into it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd really like to see your fix for registering own devices.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576492#M19442</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576493#M19443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mch0 on Wed Aug 20 03:13:36 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;No problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code "external" to the current spifi lib:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/* Register the correct family for the new device */
SPIFI_DEV_FAMILY_T *pFamilyHandle;
 pFamilyHandle = spifiRegisterFamily(SPIFI_REG_FAMILY_Spansion_2Byte_PStatus);

 /* Register the new device within the family */
 {
 static const SPIFI_DEV_PDATA_T pData =
 {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "S25FL064P",
 {{0x01, 0x02, 0x16}, 0, {0}},/* JEDEC ID, extCount, ext data&amp;nbsp; */
 128,/* # of blocks */
 0x10000,/* block size */
 0,&amp;nbsp;&amp;nbsp;&amp;nbsp; /* # of sub-blocks&amp;nbsp; 32 (This device only has sub-block erase in first/last 2 blocks) */
 0,&amp;nbsp;&amp;nbsp;&amp;nbsp; /* sub-block size&amp;nbsp; 0x1000 */
 0x100,/* page size */
 32768,/* max single read bytes */
 40000000,/* max clock rate in Hz */
 (SPIFI_CAP_QUAD | SPIFI_CAP_FULLLOCK | SPIFI_CAP_NOBLOCK)/* capabilitites */
 };
 static SPIFI_DEV_DATA_T data;

 data.pDevData = &amp;amp;pData;
&amp;nbsp; spifiDevRegister(pFamilyHandle, &amp;amp;data);
 }&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Within the spifilib in file &lt;/SPAN&gt;&lt;I&gt;spifilib_dev_common.c&lt;/I&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you have to change the return parameter of the function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;SPIFI_DEV_FAMILY_T *spifiRegisterFamily(SPIFI_DEV_FAMILY_T *(*regFx)(void))&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/* Nothing to do here yet */
return pFam;
//mch return SPIFI_ERR_NONE;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's all for now, the library detects the new device. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am still not happy with some parameters, e.g. "max single read bytes". It is set to 32768 because for now I just adapted from the 32M device present. In reality the device does not have such a restriction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But what is worse, when you try to issue a read command with 32768 Bytes the library fails again. I think it is a HW issue, because the SPIFI controller has&amp;nbsp; a length field for data read and it is 14 bits. This will allow for 16383 bytes with a single command at most.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[h2]Update:[/h2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The library code for reading is indeed broken, as it does not check the length of the DATALEN field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you specify a length &amp;gt; 16383 then anything may happen. Other bits of the CMD-reg may get set, e.g. POLL. The result is likely to be a hard fault or an indefinite loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can imagine more than one way to fix this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, the read function could issue multiple read commands, it could return an error or during registering a device the max. length could be checked and an error could be reported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a design decision and NXP should decide how to fix this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As long as you don't try to read more than 16383 bytes there seems to be no further problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576493#M19443</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576494#M19444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dill on Thu Aug 21 02:30:05 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the code. Unfortunately there is no driver for the family of QSPI we are using in lpcspifilib.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And there is also no driver for most of the devices listed in UM10430 - 4.3.6.4.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've posted a new thread in lpcexpresso forum about this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576494#M19444</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPCSPFILib v0.06(Beta) available</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576495#M19445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by schisanoa on Tue Sep 09 06:47:47 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;is there an example for LPC4088?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:17:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCSPFILib-v0-06-Beta-available/m-p/576495#M19445</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:17:48Z</dc:date>
    </item>
  </channel>
</rss>

