<?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: flash signature generation question</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/flash-signature-generation-question/m-p/594784#M22701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jpplus on Sun Jan 11 17:33:44 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, if I run the code like below, if I run the program address is not from 0x1A000000, it will cause hard fault, and if I run this program addres start from 0x1A000000, then it can run. But the results generated are not same from the reference signature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe my reference signature should be correct, so the reason might be the embedded side. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or hint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//clear complete flag&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSTATCLR = (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTART = (startAddr&amp;gt;&amp;gt;4) &amp;amp; 0x0001ffff;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTOP = ((startAddr + numBytes)&amp;gt;&amp;gt;4) &amp;amp; 0x0001ffff;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTOP |= (1 &amp;lt;&amp;lt;17);// start the signature generation&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while( !(LPC_FMC-&amp;gt;FMSTAT &amp;amp; (1 &amp;lt;&amp;lt; 2)) ); //wait till signature generation is complete&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSTATCLR = (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:21:06 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:21:06Z</dc:date>
    <item>
      <title>flash signature generation question</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/flash-signature-generation-question/m-p/594783#M22700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jpplus on Thu Jan 08 00:07:39 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working to generate the signature of chip LPC4337. But now the reference signature is different with one generated by embedded side. But I am not pretty sure which side has problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does LPC has some reference or sample code to gererate reference signature or embedded code to generate signature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would take this to verify whether embedded side or PC side has problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Blow agorithm looks simple, but I cannot get the matched results. BTW, I am use 16 bytes to test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;---------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sign = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FOR address = FMSTART.FMSTART TO FMSTOP.FMSTOP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FOR i = 0 TO 126&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nextSign&lt;/SPAN&gt;&lt;I&gt; = f_Q[address]&lt;I&gt; XOR sign[i+1]&lt;BR /&gt;nextSign[127] = f_Q[address][127] XOR sign[0] XOR sign[2] XOR&lt;BR /&gt;sign[27] XOR sign[29]&lt;BR /&gt;sign = nextSign&lt;BR /&gt;}&lt;BR /&gt;signature128 = sign&lt;/I&gt;&lt;/I&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/flash-signature-generation-question/m-p/594783#M22700</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: flash signature generation question</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/flash-signature-generation-question/m-p/594784#M22701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jpplus on Sun Jan 11 17:33:44 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, if I run the code like below, if I run the program address is not from 0x1A000000, it will cause hard fault, and if I run this program addres start from 0x1A000000, then it can run. But the results generated are not same from the reference signature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe my reference signature should be correct, so the reason might be the embedded side. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or hint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//clear complete flag&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSTATCLR = (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTART = (startAddr&amp;gt;&amp;gt;4) &amp;amp; 0x0001ffff;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTOP = ((startAddr + numBytes)&amp;gt;&amp;gt;4) &amp;amp; 0x0001ffff;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSSTOP |= (1 &amp;lt;&amp;lt;17);// start the signature generation&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while( !(LPC_FMC-&amp;gt;FMSTAT &amp;amp; (1 &amp;lt;&amp;lt; 2)) ); //wait till signature generation is complete&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_FMC-&amp;gt;FMSTATCLR = (1 &amp;lt;&amp;lt; 2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:21:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/flash-signature-generation-question/m-p/594784#M22701</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:21:06Z</dc:date>
    </item>
  </channel>
</rss>

