<?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: 56800E CW erratic behaviour between flash page boundaries  - solved in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-CW-erratic-behaviour-between-flash-page-boundaries/m-p/142339#M1462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The initialization of the program flash was replaced on the 8165 .cfg file.&lt;BR /&gt;&lt;BR /&gt;The test code and the project itself now appears to be both running ok.&lt;BR /&gt;&lt;BR /&gt;Since I've not changed anything in the original file before, it could indicate&lt;BR /&gt;a CW bug.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Marchesi&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2007 00:16:07 GMT</pubDate>
    <dc:creator>marchesi</dc:creator>
    <dc:date>2007-01-12T00:16:07Z</dc:date>
    <item>
      <title>56800E CW erratic behaviour between flash page boundaries</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-CW-erratic-behaviour-between-flash-page-boundaries/m-p/142338#M1461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the test code I'm trying to run:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for( ; ; ) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;led1_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;led2_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;led3_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;led4_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;led5_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;led6_NegVal( );&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For a long time I'm trying to fix the following problem: when the codes cross a page boundary, 0x0200 for instance, strange things happen. So, to show that up, I've changed the PExpert 0xAC start code address to 0x1AC. This way this code will cross the 0x0200 address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, if we keep the factory setting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;debugger&amp;gt;debugger settings&amp;gt;stop on application launch/default language entry point&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the program just crashes. If I make a stop and try a program mem dump, opcodes below 0x0200 turn to FFFF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if we change that option to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;debugger&amp;gt;debugger settings&amp;gt;stop on application launch/program entry point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it runs ok, and software breakpoints work fine. But that's just because the for loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resides ahead the 0x0200 boundary. A mem dump shows FFFF again below 0x0200, where&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;some opcodes were expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it's important to say that all original configs were maintained. That is,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the code is just that you see; no .cfg flash initialization changes; no alt-F7 parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I'm not using an evaluation board, could some short circuit between pins do something like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The 56F8365 data sheet, page 44, table 4-7 says that the program flash has a 1024x16 bits&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;page size. But the CW .cfg initialization file uses 512 as pageSize parameter. Is that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;byte/word respectively?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something that still bugs my mind is why the set_hfmclkd parameter in the .cfg file is&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set and fixed to 0x0A while the PExpert (correctly, it seems) calculates the FMCLKD as 61 (0x3d)... Which one CW picks to make the flash programming?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marchesi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;part: MC56F8165VFGE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CW 56800/E 7.3 - IDE version 5.6.1.1658&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PExpert 2.97 - IDE version 3.74 L2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WinXP - SP2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2007 22:15:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-CW-erratic-behaviour-between-flash-page-boundaries/m-p/142338#M1461</guid>
      <dc:creator>marchesi</dc:creator>
      <dc:date>2007-01-10T22:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: 56800E CW erratic behaviour between flash page boundaries  - solved</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-CW-erratic-behaviour-between-flash-page-boundaries/m-p/142339#M1462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The initialization of the program flash was replaced on the 8165 .cfg file.&lt;BR /&gt;&lt;BR /&gt;The test code and the project itself now appears to be both running ok.&lt;BR /&gt;&lt;BR /&gt;Since I've not changed anything in the original file before, it could indicate&lt;BR /&gt;a CW bug.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Marchesi&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 00:16:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-CW-erratic-behaviour-between-flash-page-boundaries/m-p/142339#M1462</guid>
      <dc:creator>marchesi</dc:creator>
      <dc:date>2007-01-12T00:16:07Z</dc:date>
    </item>
  </channel>
</rss>

