<?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: CodeWarrior NAND flash issues on P1020RDB-PD in QorIQ</title>
    <link>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640246#M4635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296202" data-username="ericfornstedt" href="https://community.nxp.com/people/ericfornstedt"&gt;Eric Fornstedt&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you setup NOR Flash u-boot first, then mark the NAND flash block at address 0x27051956 as bad block under u-boot, please try u-boot command "nand markbad".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yiping&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2017 07:40:18 GMT</pubDate>
    <dc:creator>yipingwang</dc:creator>
    <dc:date>2017-04-27T07:40:18Z</dc:date>
    <item>
      <title>CodeWarrior NAND flash issues on P1020RDB-PD</title>
      <link>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640245#M4634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are trying to put an image file to the NAND flash of our P1020RDB-PD board through &lt;BR /&gt;CodeWarrior's Flash Programmer, but have run into som problems. If we simply import the provided Target Task called P1020RDB-PD_NAND_FLASH, and use a run configuration which is set as "Connect" with the predefined target configuration P1020RDB-PD_RAM, it cannot erase or program the device with an "Erase and Program" operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything look alright to me until it all of a sudden just bail out with an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 12px;"&gt;fl::target -lc "P1020RDB-PD RAM Connect"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;fl::target -b 0x2000 0x30000&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;fl::target -v off -l on&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;cmdwin::fl::device -d "MT29F1G08ABAEA-eLBC" -o "128Mx8x1" -a 0x0 0x7ffffff&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;cmdwin::fl::image -f "/&amp;lt;very-long-path&amp;gt;/example.img" -t "Auto Detect" -re on -r 0x0 0x7ffffff -oe on -o 0x0&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;cmdwin::fl::erase image&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Beginning Operation ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;------------------------- &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Trying auto-detect... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Elf Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Motorola S-Record Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Auto-detection is successful. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; File is of type Binary/Raw Format. &lt;/SPAN&gt;
 
&lt;SPAN style="font-size: 12px;"&gt; log: Using Algorithm: MT29FxG08-eLBC.elf &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Target Configuration Settings &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Launch Configuration: P1020RDB-PD RAM Connect &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Connecting ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Performing target initialization ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Connected ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Execute: Erase &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Timestamp: Tue Apr 25 14:00:27 2017 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Device: MT29F1G08ABAEA-eLBC &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Organization: 128Mx8x1 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Mem Start Addr: 0x00000000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Mem End Addr: 0x07FFFFFF &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Downloading Flash Device Driver ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Loading Flash Device Driver at: 0x00002000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Flash Driver Buffer is at: 0x00008800 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Flash Driver Buffer Size is: 0x00029800 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Address &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the address of the sector list &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Clearing the status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Setting up Registers &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Commanding target to run &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Reading flash ID ...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Reading init return status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Done &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Initialization Command Succeeded &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing Erase Function Code &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Address &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Number of Sectors &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the address of the sector list &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the sector list &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Erasing Sector 0x00000000 to 0x0001FFFF &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Clearing the status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Setting up Registers &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Commanding target to run &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Erasing ...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Reading erase return status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Did not erase bad block at address 0x00000000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Error: Erase failed.&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Timestamp: Tue Apr 25 14:00:32 2017 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Error: Erase failed.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is more strange is that if I for example run a "Dump Flash" operation prior to the "Erase and Program" operation, the erase succeed, but it fails on the program step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;lt;---- Cut away identical log ------&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Erasing Sector 0x00000000 to 0x0001FFFF &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Clearing the status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Setting up Registers &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Commanding target to run &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Erasing ...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Reading erase return status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Done &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Erase Command Succeeded &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Timestamp: Tue Apr 25 14:24:32 2017 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;cmdwin::fl::write&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;------------------------- &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Using restricted address range 0x00000000 to 0x07FFFFFF &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Programming file /&amp;lt;very-long-path&amp;gt;/example.img &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Trying auto-detect... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Elf Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Motorola S-Record Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Auto-detection is successful. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; File is of type Binary/Raw Format. &lt;/SPAN&gt;
 
&lt;SPAN style="font-size: 12px;"&gt; log: Using Algorithm: MT29FxG08-eLBC.elf &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Execute: Program &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Timestamp: Tue Apr 25 14:24:32 2017 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Device: MT29F1G08ABAEA-eLBC &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Organization: 128Mx8x1 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Mem Start Addr: 0x00000000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: === Flash Mem End Addr: 0x07FFFFFF &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: ====================================================================== &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Downloading Flash Device Driver ... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Loading Flash Device Driver at: 0x00002000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Flash Driver Buffer is at: 0x00008800 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Flash Driver Buffer Size is: 0x00029800 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Address &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the address of the sector list &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Clearing the status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Setting up Registers &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Commanding target to run &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; Reading flash ID ...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Reading init return status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Done &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Initialization Command Succeeded &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Trying auto-detect... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Elf Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: File is NOT of type Motorola S-Record Format. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Auto-detection is successful. &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; File is of type Binary/Raw Format. &lt;/SPAN&gt;
 
&lt;SPAN style="font-size: 12px;"&gt;Downloading 0x00010000 bytes to be programmed at 0x00000000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Downloading 0x0000545C bytes to be programmed at 0x00010000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Programming 0x0000545C bytes of Target Memory at 0x00000000 &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing Program Function Code &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Address &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the Size &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Writing the address of the buffer &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Clearing the status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Setting up Registers &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Commanding target to run &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Executing program .... &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt; log: Reading program return status &lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Error: Program failed. Flash driver reports the following error(s): Bad block detected in flash at address 0x27051956&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;Error: Program failed. Flash driver reports the following error(s): Bad block detected in flash at address 0x27051956&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading and writing NAND flash from within uBoot works fine, and if I examine the results of CodeWarrior's flash attempts I see that it can indeed erase the flash. It can also write something, but the data is corrupt somehow and is not the expected image file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also made a quick attempt to disable the bad block handling as suggested in &lt;A _jive_internal="true" href="https://community.nxp.com/thread/431808" rel="nofollow noopener noreferrer" target="_blank"&gt;another thread&lt;/A&gt;. The programming part did succeed then according to CodeWarrior log, but data was still corrupted on target so I guess that is not the way forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea of why we see these issues?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;BR /&gt;/ Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 11:50:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640245#M4634</guid>
      <dc:creator>ericfornstedt</dc:creator>
      <dc:date>2017-04-25T11:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: CodeWarrior NAND flash issues on P1020RDB-PD</title>
      <link>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640246#M4635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296202" data-username="ericfornstedt" href="https://community.nxp.com/people/ericfornstedt"&gt;Eric Fornstedt&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you setup NOR Flash u-boot first, then mark the NAND flash block at address 0x27051956 as bad block under u-boot, please try u-boot command "nand markbad".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yiping&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 07:40:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640246#M4635</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2017-04-27T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: CodeWarrior NAND flash issues on P1020RDB-PD</title>
      <link>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640247#M4636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yiping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOR Flash u-boot is already in place, and from there it is possible to flash NAND normally without issues. It is only from CodeWarrior it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really see how marking address 0x27051956 as a bad block would be possible (I did try anyway, just in case). The P1020RDB-PD board has 128 MB of NAND flash only, so highest address would be 0x07FFFFFF right? And, the specific address/number 0x27051956 seems to be related to some magic number used by u-boot when I google it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;/ Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 08:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/CodeWarrior-NAND-flash-issues-on-P1020RDB-PD/m-p/640247#M4636</guid>
      <dc:creator>ericfornstedt</dc:creator>
      <dc:date>2017-04-27T08:28:39Z</dc:date>
    </item>
  </channel>
</rss>

