<?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>S12 / MagniV MicrocontrollersのトピックRe: Building a Checksum with paged ROM</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171435#M5783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ok! After moving another module from&amp;nbsp;fixed&amp;nbsp;page&amp;nbsp;to a non-fixed page i had enough space for the CRC routine. Now it works fine.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for your support!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Heiko&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2008 18:58:46 GMT</pubDate>
    <dc:creator>buhr</dc:creator>
    <dc:date>2008-07-09T18:58:46Z</dc:date>
    <item>
      <title>Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171431#M5779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I need help concerning the following:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have to build a CRC32-Checksum of the whole FlashRom and parts of the EEP of a MC9S12DP256. The problem is: the memory is configured as "paged", so I have to use the PPAGE - register. Unfortunately the code is located on Page 38, which is not a fixed adress page. Therefor when I use the PPAGE register, the controller runs anywhere.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there any solution how to read the ROM by using a pointer from any page or is the only way to locate the code on a fixed adress page? This&amp;nbsp;would be very difficult because these pages are nerly completely full&amp;nbsp;with data, tables,&amp;nbsp;flashbootloader, Lib's, ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope someone can help me.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Heiko&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 14:08:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171431#M5779</guid>
      <dc:creator>buhr</dc:creator>
      <dc:date>2008-07-09T14:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171432#M5780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT color="#330000"&gt;You can have *small* routine in "fixed" page that would just switch PPAGE, fetch some data, restore PPAGE and return to your CRC checking routine.&amp;nbsp;CW large&amp;nbsp;memory model does the same when you dereference far data memory pointer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 14:32:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171432#M5780</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-07-09T14:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171433#M5781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for your fast reply. So there's no other way than reading from fixed&amp;nbsp;pages, right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Your proposal is just&amp;nbsp;the way I was thinking about in this moment. It means one more subroutine call, but the stack-size should manage this.&lt;/DIV&gt;&lt;DIV&gt;Meanwhile I found a module that could be moved to a non-fixed page, so hopefully I have enough space for the complete CRC function.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Heiko&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 15:14:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171433#M5781</guid>
      <dc:creator>buhr</dc:creator>
      <dc:date>2008-07-09T15:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171434#M5782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT color="#330000"&gt;Yes, your paged memory access routine should run not from paged memory. Access routine that will switch PPAGE should run from&amp;nbsp;nonpaged 4000-7fff or c000-ffff flash,&amp;nbsp;RAM or EEPROM. No more options, except maybe nonpaged external memory.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 16:22:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171434#M5782</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-07-09T16:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171435#M5783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ok! After moving another module from&amp;nbsp;fixed&amp;nbsp;page&amp;nbsp;to a non-fixed page i had enough space for the CRC routine. Now it works fine.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for your support!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Heiko&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 18:58:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171435#M5783</guid>
      <dc:creator>buhr</dc:creator>
      <dc:date>2008-07-09T18:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Checksum with paged ROM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171436#M5784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I don't understand all of your concern. If using Codewarrior C then you can reference paged FLASH using *far data modifier. The compiler will link to an intrinsic support function loaded in NON_BANKED segment which will transparently handle PPAGE for you no matter where your code is running from.&lt;BR /&gt;&lt;BR /&gt;I recently had an issue where my bootloader/updater needed to be able to replace all of FLASH while running from RAM. I had to hunt down and make sure the compiler was not calling any intrinsic support routines because they would not exist during certain phases of a firmware update.&lt;BR /&gt;&lt;BR /&gt;Code doesn't paste very well here but this is a routine I use:&lt;BR /&gt;&lt;BR /&gt;//============================================================================&lt;BR /&gt;//&lt;BR /&gt;// crc paged FLASH.&lt;BR /&gt;//&lt;BR /&gt;// Warns saying DPAGE is being used but on examination of generated code&lt;BR /&gt;// it calls _LOAD_FAR_8 routine which uses PPAGE, which is correct. Mute&lt;BR /&gt;// this warning rather than fight CW. -CpPPAGE breaks other things.&lt;BR /&gt;//&lt;BR /&gt;// Uses Codewarrior CRC_CCITT algorithm.&lt;BR /&gt;//&lt;BR /&gt;//============================================================================&lt;BR /&gt;#pragma MESSAGE DISABLE C12002&lt;BR /&gt;UINT16&lt;BR /&gt;crc_flash( UINT16 crc, UINT08 *far start, UINT08 *far end )&lt;BR /&gt;{&lt;BR /&gt;_RESET_COP_(); // need to time this loop and make sure&lt;BR /&gt;&lt;BR /&gt;do {&lt;BR /&gt;crc = cw_crc_ccitt_16( crc, *start++ );&lt;BR /&gt;}&lt;BR /&gt;while( start end );&lt;BR /&gt;&lt;BR /&gt;_RESET_COP_();&lt;BR /&gt;return crc;&lt;BR /&gt;}&lt;BR /&gt;#pragma MESSAGE DEFAULT C12002&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2008 21:30:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Building-a-Checksum-with-paged-ROM/m-p/171436#M5784</guid>
      <dc:creator>dkelly</dc:creator>
      <dc:date>2008-07-14T21:30:38Z</dc:date>
    </item>
  </channel>
</rss>

