<?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 Re: Issue regarding difference between bytes coping on flash memory of LPC1767 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933434#M37171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bilalqureshi.epic@gmail.com"&gt;bilalqureshi.epic@gmail.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to answer your question the best I can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The checksum will be send it after all the package, using the flash magic as a reference, this send 512 bytes for each command to write in RAM (this is implementation of the flash magic, it could be until 900 bytes), this is calculated&amp;nbsp;adding the raw data of all the 512 bytes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if all the 512 bytes are 0xFF the checksum will be 130560:&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/82369iCF3642606E368779/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;Remember that the encoding that is used is the UU-encoded so the packages will have up to 61 bytes, (1 of the size of the package + 32 and the payload encoded) each 4 bytes will represent 3 bytes of raw data. That's why the payload raw data is 45.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2019 21:53:37 GMT</pubDate>
    <dc:creator>Alexis_A</dc:creator>
    <dc:date>2019-07-22T21:53:37Z</dc:date>
    <item>
      <title>Issue regarding difference between bytes coping on flash memory of LPC1767</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933433#M37170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have task to develop a software for writing hex content to flash, of course there are tools for it but the tools had issues so i had to make my own software for it but first i need to understand it (for understanding purpose i am using flashmagic software for now).&lt;/P&gt;&lt;P&gt;The issue is that its says in NXP LPCxx document that&amp;nbsp;&lt;STRONG&gt;The length of any&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;UU-encoded line should not exceed 61 characters (bytes) i.e. it can hold 45 data bytes.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;The receiver should compare it with the check-sum of the received bytes.&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;My first question is that it is not mentioned in document or i am having understanding issue that will the after writing data in reader will the checksum will be send along it or after it separately.&lt;/LI&gt;&lt;LI&gt;My second question is it says in document that &lt;STRONG&gt;20 UU encoded&lt;/STRONG&gt; lines are sent so basically does it mean &lt;STRONG&gt;20 X 61 = 1220 bytes or 45 X 20 = 900 bytes? and is that 1 byte is for checksum?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;What is formula to calculate checksum?&lt;/LI&gt;&lt;LI&gt;My third question is that i used flashmagic tool for now if 1220 bytes per cycle are sent to reader as mentioned in question 2, but the the amount of bytes that are copied from RAM to flash are &lt;STRONG&gt;1024&lt;/STRONG&gt;&amp;nbsp;bytes per cycle that are &lt;STRONG&gt;less than 1220 bytes or 900 bytes are the valid case.&amp;nbsp;&lt;/STRONG&gt;How is this possible that number of bytes that are copied to flash are less than 1220 byes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;M.Bilal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 10:01:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933433#M37170</guid>
      <dc:creator>bilalqureshi_ep</dc:creator>
      <dc:date>2019-07-17T10:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue regarding difference between bytes coping on flash memory of LPC1767</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933434#M37171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bilalqureshi.epic@gmail.com"&gt;bilalqureshi.epic@gmail.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to answer your question the best I can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The checksum will be send it after all the package, using the flash magic as a reference, this send 512 bytes for each command to write in RAM (this is implementation of the flash magic, it could be until 900 bytes), this is calculated&amp;nbsp;adding the raw data of all the 512 bytes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if all the 512 bytes are 0xFF the checksum will be 130560:&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/82369iCF3642606E368779/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;Remember that the encoding that is used is the UU-encoded so the packages will have up to 61 bytes, (1 of the size of the package + 32 and the payload encoded) each 4 bytes will represent 3 bytes of raw data. That's why the payload raw data is 45.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2019 21:53:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933434#M37171</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-07-22T21:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue regarding difference between bytes coping on flash memory of LPC1767</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933435#M37172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You @Alexis Andalon, i applied what you said and getting correct uu-encoding as that of flash magic, the only issue i am facing right now is checksum of first and last 512 bytes, i am not sure what is wrong with first 512 bytes checksum but some how i think there is padding in last checksum of "F". for example for first 512 bytes i get 34964 checksum of raw data whereas it should be 35644, after this all the checksum are fine except the last one. Can you kindly help me with this one as well according to your knowledge.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2019 11:53:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Issue-regarding-difference-between-bytes-coping-on-flash-memory/m-p/933435#M37172</guid>
      <dc:creator>bilalqureshi_ep</dc:creator>
      <dc:date>2019-09-11T11:53:11Z</dc:date>
    </item>
  </channel>
</rss>

