<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Windows Mail 17.5.9600.22013">
<style type="text/css"><!--html { font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; }--></style><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, 
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, 
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style>
</head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;">
<div>I  think it needs the OOB data in the image.<br>
Just looked on the net about ,it say…<br>
<br>
<span style="text-align: left; color: rgb(36, 39, 41); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">How
 does this combination of<span> </span></span><code style="margin: 0px; padding: 1px 5px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: pre-wrap; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(239, 240, 241); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">nandsim</code><span style="text-align: left; color: rgb(36, 39, 41); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">,<span> </span></span><code style="margin: 0px; padding: 1px 5px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: pre-wrap; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(239, 240, 241); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">nandwrite</code><span style="text-align: left; color: rgb(36, 39, 41); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span> </span>and<span> </span></span><code style="margin: 0px; padding: 1px 5px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: pre-wrap; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(239, 240, 241); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">nandddump</code><span style="text-align: left; color: rgb(36, 39, 41); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span> </span>decide
 which ECC scheme to use? The flash is from a TI AM335 system, and as far as I know, the ECC scheme is decided by a combination of the processor and OS. How do these utilities know what to do?</span></div>
<div><br>
</div>
<div>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
First of all the ECC scheme used does not necessarily have to be for all the flash erase blocks. There are ususally 3 different types of flash partitions used and for every type the method to specify the used ECC code differs:</p>
<ol style="list-style: decimal; margin: 0px 0px 1em 30px; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
The one that are accessed by the ROM bootcode</li><li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
The ones that are accessed by the bootloader (usually u-boot)</li><li style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
The ones that are accessed by the operating system (assuming you are using Linux)</li></ol>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
In general the use of a specific ECC method is limited by the OOB size of the flash.<span> </span><em style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: italic; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">The
 AM335x_U-Boot_User's_Guide</em><span> </span>(cannot post link here because of reputation) explains it in sections<span> </span><em style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: italic; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">BCH
 Flash OOB Layout</em><span> </span>and the example matches to the flash chip you are using. The 64 bytes per 2k page effectively limit the usable ECC algorithms to BCH8, BCH4 or HAMMING codes.</p>
<blockquote style="border-width: 0px 0px 0px 2px; margin: 0px 0px 10px; padding: 10px; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; border-left-color: rgb(255, 235, 142); border-left-style: solid; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; quotes: none; font-stretch: inherit; background-color: rgb(255, 248, 220); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
BCH Flash OOB Layout</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
For any ECC scheme we need to add some extra data while writing so as to detect and correct (if possible) the errors introduced by the NAND part. In case of BCH scheme some bytes are needed to store the ECC related info.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
The section of NAND memory where addition info like ECC data is stored is referred to as Out Of Band or OOB section.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
The first 2 bytes are used for Bad block marker – 0xFFFF => Good block</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
The next ‘N’ bytes is used for BCH bytes</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
N = B * Number of 512-byte sectors in a page</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
B = 8 bytes per 512 byte sector in BCH4 B = 14 bytes per 512 byte sector in BCH8 B = 26 bytes per 512 byte sector in BCH16</p>
<p style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
So for a 2k page-size NAND flash with 64-byte OOB size, we will use BCH8. This will consume 2 + (14*4) = 58 bytes out of 64 bytes available.</p>
</blockquote>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
ECC used by ROM bootcode</h3>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
The AM335x processor's ROM bootcode decides which ECC scheme to use for NAND flash depending on the mechanism expalined in the AM335x technical reference manual chapter 26.1.7.4 NAND</p>
<blockquote style="border-width: 0px 0px 0px 2px; margin: 0px 0px 10px; padding: 10px; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; border-left-color: rgb(255, 235, 142); border-left-style: solid; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; quotes: none; font-stretch: inherit; background-color: rgb(255, 248, 220); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
<p style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; clear: both; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">
ECC Correction The default ECC correction applied is BCH 8b/sector using the GPMC and ELM hardware. For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, CEh when manufacturer code (first ID byte) is 98h the Cell type information is checked in the 4th byte
 of ID data. If it is equal to 10b then the ECC correction applied is BCH 16b/sector. In addition ECC computation done by the ROM can be turned off completely by using SYSBOOT[9]. This is particularly useful when interfacing with NAND devices that have built
 in ECC engines.</p>
</blockquote>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
Other ways to control the ECC behavior are ONFI or and I2C EEPROM but the H27U1G8F2BTR datasheet does not mention ONFI so I guess it is not supported by the flash chip.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
So basically BCH8 or BCH16 or no ECC mechanism is used for the first 128K the ROM bootloader reads from NAND flash.</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
ECC used by the bootloader</h3>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
The bootloader decides this on his own. For example for U-boot this information is compiled into u-boot and the first level bootloader (SPL/MLO) as well. The information is controlled by U-Boot configuration settings set at compile time. Recent versions of
 U-boot can switch the ecc at runtime using the nandecc command.</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
ECC used by the OS</h3>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
The selection is completely OS specific. For Linux embedded systems using AM335x processors I know that this information is passed into the kernel using the device tree.</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
Which ECC method does nandsim use</h3>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
There is a parameter called<span> </span><em style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: italic; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit;">bch</em><span> </span>which
 can be passed to the nandsim module to select an ecc code. From the code I guess It is initialized to zero so it won't use any ECC code. So it seems that nandsim can use BCH8 and BCH16 but only one for the whole flash that is simulated.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
<code style="margin: 0px; padding: 1px 5px; border: 0px black; border-image: none; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; white-space: pre-wrap; box-sizing: inherit; font-stretch: inherit; background-color: rgb(239, 240, 241);">modprobe
 nandsim bch=8 first_id_byte=0xad second_id_byte=0xf1 third_id_byte=0x00 fourth_id_byte=0x1d<br>
</code></p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
Which ECC method does nanddump/nandwrite use</h3>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; clear: both; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
Again, this depends on the OS/Linux you used to dump the flash. Similar to the nandsim module real mtd drivers have ways to specify the used ECC scheme (kernel parameters, device tree). But you can instruct nanddump to ignore the ECC information, too.</p>
<h3 style="margin: 0px 0px 1em; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 17px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
References</h3>
<ul style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px black; border-image: none; text-align: left; color: rgb(36, 39, 41); text-transform: none; line-height: inherit; text-indent: 0px; letter-spacing: normal; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; word-spacing: 0px; vertical-align: baseline; white-space: normal; box-sizing: inherit; orphans: 2; widows: 2; font-stretch: inherit; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit;">
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
AM335x technical reference manual<span> </span><a style="margin: 0px; padding: 0px; border: 0px black; border-image: none; color: rgb(44, 87, 119); line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; text-decoration: underline; vertical-align: baseline; cursor: pointer; box-sizing: inherit; font-stretch: inherit;" href="http://www.ti.com/lit/gpn/am3359" target="_parent" rel="nofollow">http://www.ti.com/lit/gpn/am3359</a></li><li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
bch Linux Kernel parameter for nandsim<span> </span><a style="margin: 0px; padding: 0px; border: 0px black; border-image: none; color: rgb(44, 87, 119); line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; text-decoration: underline; vertical-align: baseline; cursor: pointer; box-sizing: inherit; font-stretch: inherit;" href="http://lxr.free-electrons.com/source/drivers/mtd/nand/nandsim.c#L175" target="_parent" rel="nofollow">http://lxr.free-electrons.com/source/drivers/mtd/nand/nandsim.c#L175</a></li><li style="margin: 0px; padding: 0px; border: 0px black; border-image: none; line-height: inherit; font-family: inherit; font-size: 15px; font-style: inherit; font-variant: inherit; font-weight: inherit; vertical-align: baseline; box-sizing: inherit; font-stretch: inherit; overflow-wrap: break-word;">
The AM335x_U-Boot_User's_Guide</li></ul>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
<br>
</div>
<div data-signatureblock="true">
<div>Spanner..<br>
<br>
http://amstrad-e3-hacking.freeforums.net</div>
<div><br>
</div>
</div>
<div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;">
<div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style="line-height: 15pt; letter-spacing: 0.02em; font-family: "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 12pt;"><b>From:</b> <a href="mailto:ralph@inputplus.co.uk" target="_parent">Ralph
 Corderoy</a><br>
<b>Sent:</b> ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎18‎:‎30<br>
<b>To:</b> <a href="mailto:e3-hacking@earth.li" target="_parent">Discussion of the Amstrad E3 emailer hardware/software</a></font></div>
</div>
<div><br>
</div>
<div dir="">
<div id="readingPaneBodyContent">Hi Nick,<br>
<br>
> I copied it twice not<br>
<br>
What's the output of copying it once?<br>
<br>
> Amstrad Delta - PBL V4.9 Build:1311 Assert Debug ICE<br>
> PBL 32MB NAND<br>
> 0MB.-->MEMv01.00.002,CopyLim=00220000h,CodeEnd=01400000h-->PBL......1MB.......2MB*<br>
<br>
What if you try reading out the flash.  Do you get what you put in?<br>
`cmp foo bar' compares all the bytes in those two files and complains if<br>
any differ.<br>
<br>
Otherwise, I think you'll have to wait for someone that knows mtd to<br>
come along and offer suggestions.<br>
<br>
-- <br>
Cheers, Ralph.<br>
<br>
_______________________________________________<br>
e3-hacking mailing list<br>
e3-hacking@earth.li<br>
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hacking&amp;data=02%7C01%7C%7C7e771ee689d44d2e2a3708d6c8da91b3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636917238407255934&amp;sdata=9aSwi%2FcYoSJiQxT3YOnLEpBnflwfq4pKUlBKp8J2rus%3D&amp;reserved=0<br>
</div>
</div>
</div>
</body>
</html>