<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mikeqin</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mikeqin"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Mikeqin"/>
	<updated>2026-04-24T10:48:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_mm_tools&amp;diff=64264</id>
		<title>Avalon mm tools</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_mm_tools&amp;diff=64264"/>
		<updated>2017-11-21T15:24:07Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* How to compile and run Avalon mm tools from source code (Under Debian GNU/Linux 7.4) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What does the Avalon mm tools do ==&lt;br /&gt;
Avalon mm tools is a program to upgrade Avalon4 mm firmware through [https://en.bitcoin.it/wiki/Avalon4#AUC AUC].&lt;br /&gt;
&lt;br /&gt;
It can be used to upgrade 13 Avalon4s maximum simultaneously under one AUC.&lt;br /&gt;
&lt;br /&gt;
Take care: &amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;Don&#039;t upgrade Avalon4 MM-4.0 and Avalon4 MM-4.1 under the same AUC please&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What Avalon4 firmware are supported by Avalon mm tools ==&lt;br /&gt;
Support mm versions(MM-4.0: &amp;gt;= &#039;&#039;&#039;401412-7ef4ab10&#039;&#039;&#039;, MM-4.1: &#039;&#039;&#039;Any one&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Latest firmware link: [http://downloads.canaan-creative.com/software/avalon4/mm41/latest/mm.mcs For MM-4.1] [http://downloads.canaan-creative.com/software/avalon4/mm/latest/mm.mcs For MM-4.0]&lt;br /&gt;
&lt;br /&gt;
Firmware history: [https://en.bitcoin.it/wiki/Avalon4#MM_Firmware_.28For_MM-4.1.29 MM-4.1 firmware] [https://en.bitcoin.it/wiki/Avalon4#MM_Firmware_.28For_MM-4.0.29 MM4.0 firmware]&lt;br /&gt;
&lt;br /&gt;
== How can i get the Avalon4 firmware version ==&lt;br /&gt;
Login the controller, Then find it under Cgminer Status-&amp;gt;Avalon Devices Status-&amp;gt;Device.&lt;br /&gt;
&lt;br /&gt;
== What does the meaning of firmware version ==&lt;br /&gt;
For example &#039;&#039;&#039;401412-7ef4ab10&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
      &#039;&#039;&#039;40&#039;&#039;&#039;: MM-4.0 firmware, 40: MM-4.0, 41:MM-4.1&lt;br /&gt;
    &#039;&#039;&#039;1412&#039;&#039;&#039;: Release date 2014/12&lt;br /&gt;
  &#039;&#039;&#039;7ef4ab&#039;&#039;&#039;: Git abbreviate.(git repo:https://github.com/Canaan-Creative/mm/tree/avalon4)&lt;br /&gt;
       &#039;&#039;&#039;1&#039;&#039;&#039;: Bootloader flag, 1: enable bootloader, 0: disable bootloader&lt;br /&gt;
       &#039;&#039;&#039;0&#039;&#039;&#039;: Release flag, 0: Release version, 1: Debug version&lt;br /&gt;
&lt;br /&gt;
== How to upgrade Avalon4 mm firmware through Raspberry Pi(Model B) or TL-WR703N ==&lt;br /&gt;
Use the latest avalon firmware for Raspberry Pi(Model B):[http://downloads.canaan-creative.com/software/avalon4/openwrt/latest/openwrt-brcm2708-sdcard-vfat-ext4.img openwrt-brcm2708-sdcard-vfat-ext4.img], for TL-WR703N:[http://downloads.canaan-creative.com/software/avalon4/openwrt/latest/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin]&lt;br /&gt;
&lt;br /&gt;
Keep AUC connect the same as mining before upgrade&lt;br /&gt;
&lt;br /&gt;
Login the controller(Default IP: 192.168.0.100) , Then you can upgrade mm firmware through the page: Status-&amp;gt;MM Upgrade&lt;br /&gt;
&lt;br /&gt;
Reboot Avalon4 if upgrade finish&lt;br /&gt;
&lt;br /&gt;
== How to compile and run Avalon mm tools from source code (Under Debian GNU/Linux 7.4) ==&lt;br /&gt;
&#039;&#039;&#039;For example, Upgrade Avalon4 MM-4.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 1. Install dependency&lt;br /&gt;
    sudo su&lt;br /&gt;
    apt-get install build-essential autoconf automake libtool pkg-config libudev-dev&lt;br /&gt;
 &lt;br /&gt;
 2. Clone &amp;amp; Compile &amp;amp; Run&lt;br /&gt;
    git clone https://github.com/Canaan-Creative/Avalon-extras.git&lt;br /&gt;
    cd ./Avalon-extras/mm-tools &amp;amp;&amp;amp; ./autogen.sh &amp;amp;&amp;amp; ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
    sudo su&lt;br /&gt;
    wget http://downloads.canaan-creative.com/software/avalon4/mm/latest/mm.mcs -O ./mm.mcs &amp;amp;&amp;amp; ./mm_tools&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
* Compile flags for AvalonMiner&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Machine Type&lt;br /&gt;
! Compile flags&lt;br /&gt;
|-&lt;br /&gt;
| Avalon4, AvalonMiner 6.0&lt;br /&gt;
| ./configure&lt;br /&gt;
|-&lt;br /&gt;
| AvalonMiner 7xx&lt;br /&gt;
| ./configure --enable-soft-crc&lt;br /&gt;
|-&lt;br /&gt;
| AvalonMiner 8xx&lt;br /&gt;
| ./configure --enable-soft-crc --enable-flash-layout-2m&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_mm_tools&amp;diff=64263</id>
		<title>Avalon mm tools</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_mm_tools&amp;diff=64263"/>
		<updated>2017-11-21T15:23:12Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* How to compile and run Avalon mm tools from source code (Under Debian GNU/Linux 7.4) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What does the Avalon mm tools do ==&lt;br /&gt;
Avalon mm tools is a program to upgrade Avalon4 mm firmware through [https://en.bitcoin.it/wiki/Avalon4#AUC AUC].&lt;br /&gt;
&lt;br /&gt;
It can be used to upgrade 13 Avalon4s maximum simultaneously under one AUC.&lt;br /&gt;
&lt;br /&gt;
Take care: &amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;Don&#039;t upgrade Avalon4 MM-4.0 and Avalon4 MM-4.1 under the same AUC please&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What Avalon4 firmware are supported by Avalon mm tools ==&lt;br /&gt;
Support mm versions(MM-4.0: &amp;gt;= &#039;&#039;&#039;401412-7ef4ab10&#039;&#039;&#039;, MM-4.1: &#039;&#039;&#039;Any one&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Latest firmware link: [http://downloads.canaan-creative.com/software/avalon4/mm41/latest/mm.mcs For MM-4.1] [http://downloads.canaan-creative.com/software/avalon4/mm/latest/mm.mcs For MM-4.0]&lt;br /&gt;
&lt;br /&gt;
Firmware history: [https://en.bitcoin.it/wiki/Avalon4#MM_Firmware_.28For_MM-4.1.29 MM-4.1 firmware] [https://en.bitcoin.it/wiki/Avalon4#MM_Firmware_.28For_MM-4.0.29 MM4.0 firmware]&lt;br /&gt;
&lt;br /&gt;
== How can i get the Avalon4 firmware version ==&lt;br /&gt;
Login the controller, Then find it under Cgminer Status-&amp;gt;Avalon Devices Status-&amp;gt;Device.&lt;br /&gt;
&lt;br /&gt;
== What does the meaning of firmware version ==&lt;br /&gt;
For example &#039;&#039;&#039;401412-7ef4ab10&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
      &#039;&#039;&#039;40&#039;&#039;&#039;: MM-4.0 firmware, 40: MM-4.0, 41:MM-4.1&lt;br /&gt;
    &#039;&#039;&#039;1412&#039;&#039;&#039;: Release date 2014/12&lt;br /&gt;
  &#039;&#039;&#039;7ef4ab&#039;&#039;&#039;: Git abbreviate.(git repo:https://github.com/Canaan-Creative/mm/tree/avalon4)&lt;br /&gt;
       &#039;&#039;&#039;1&#039;&#039;&#039;: Bootloader flag, 1: enable bootloader, 0: disable bootloader&lt;br /&gt;
       &#039;&#039;&#039;0&#039;&#039;&#039;: Release flag, 0: Release version, 1: Debug version&lt;br /&gt;
&lt;br /&gt;
== How to upgrade Avalon4 mm firmware through Raspberry Pi(Model B) or TL-WR703N ==&lt;br /&gt;
Use the latest avalon firmware for Raspberry Pi(Model B):[http://downloads.canaan-creative.com/software/avalon4/openwrt/latest/openwrt-brcm2708-sdcard-vfat-ext4.img openwrt-brcm2708-sdcard-vfat-ext4.img], for TL-WR703N:[http://downloads.canaan-creative.com/software/avalon4/openwrt/latest/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin]&lt;br /&gt;
&lt;br /&gt;
Keep AUC connect the same as mining before upgrade&lt;br /&gt;
&lt;br /&gt;
Login the controller(Default IP: 192.168.0.100) , Then you can upgrade mm firmware through the page: Status-&amp;gt;MM Upgrade&lt;br /&gt;
&lt;br /&gt;
Reboot Avalon4 if upgrade finish&lt;br /&gt;
&lt;br /&gt;
== How to compile and run Avalon mm tools from source code (Under Debian GNU/Linux 7.4) ==&lt;br /&gt;
&#039;&#039;&#039;For example, Upgrade Avalon4 MM-4.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 1. Install dependency&lt;br /&gt;
    sudo su&lt;br /&gt;
    apt-get install build-essential autoconf automake libtool pkg-config libudev-dev&lt;br /&gt;
 &lt;br /&gt;
 2. Clone &amp;amp; Compile &amp;amp; Run&lt;br /&gt;
    git clone https://github.com/Canaan-Creative/Avalon-extras.git&lt;br /&gt;
    cd ./Avalon-extras/mm-tools &amp;amp;&amp;amp; ./autogen.sh &amp;amp;&amp;amp; ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
    sudo su&lt;br /&gt;
    wget http://downloads.canaan-creative.com/software/avalon4/mm/latest/mm.mcs -O ./mm.mcs &amp;amp;&amp;amp; ./mm_tools&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
* Compile flags for AvalonMiner&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Machine Type&lt;br /&gt;
! Compile flags&lt;br /&gt;
|-&lt;br /&gt;
| Avalon4, Avalon6&lt;br /&gt;
| ./configure&lt;br /&gt;
|-&lt;br /&gt;
| Avalon7&lt;br /&gt;
| ./configure --enable-soft-crc&lt;br /&gt;
|-&lt;br /&gt;
| Avalon8&lt;br /&gt;
| ./configure --enable-soft-crc --enable-flash-layout-2m&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Comparison_of_mining_pools&amp;diff=61719</id>
		<title>Comparison of mining pools</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Comparison_of_mining_pools&amp;diff=61719"/>
		<updated>2016-10-19T09:32:45Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: Update block reward&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Reward types &amp;amp; explanation:&lt;br /&gt;
* &#039;&#039;&#039;CPPSRB&#039;&#039;&#039; - Capped Pay Per Share with Recent Backpay. [http://eligius.st/wiki/index.php/Capped_PPS_with_Recent_Backpay]&lt;br /&gt;
* &#039;&#039;&#039;DGM&#039;&#039;&#039; - Double Geometric Method.  A hybrid between PPLNS and Geometric reward types that enables to operator to absorb some of the variance risk.  Operator receives portion of payout on short rounds and returns it on longer rounds to normalize payments. [https://bitcointalk.org/index.php?topic=39497.0]&lt;br /&gt;
* &#039;&#039;&#039;ESMPPS&#039;&#039;&#039; - Equalized Shared Maximum Pay Per Share. Like SMPPS, but equalizes payments fairly among all those who are owed. [http://forum.bitcoin.org/index.php?topic=12181.msg378851#msg378851]&lt;br /&gt;
* &#039;&#039;&#039;POT&#039;&#039;&#039; - Pay On Target. A high variance PPS variant that pays on the difficulty of work returned to pool rather than the difficulty of work served by pool [https://bitcointalk.org/index.php?topic=131376.0]&lt;br /&gt;
* &#039;&#039;&#039;PPLNS&#039;&#039;&#039; - Pay Per Last N Shares. Similar to proportional, but instead of looking at the number of shares in the round, instead looks at the last N shares, regardless of round boundaries.&lt;br /&gt;
* &#039;&#039;&#039;PPLNSG&#039;&#039;&#039; - Pay Per Last N Groups (or shifts). Similar to PPLNS, but shares are grouped into &amp;quot;shifts&amp;quot; which are paid as a whole.&lt;br /&gt;
* &#039;&#039;&#039;PPS&#039;&#039;&#039; - Pay Per Share. Each submitted share is worth certain amoutripnt of BC. Since finding a block requires &amp;lt;current difficulty&amp;gt; shares &#039;&#039;on average&#039;&#039;, a PPS method with 0% fee would be 12.5 BTC divided by &amp;lt;current difficulty&amp;gt;. It is risky for pool operators, hence the fee is highest.&lt;br /&gt;
* &#039;&#039;&#039;Prop.&#039;&#039;&#039; - Proportional. When block is found, the reward is distributed among all workers proportionally to how much shares each of them has found.&lt;br /&gt;
* &#039;&#039;&#039;RSMPPS&#039;&#039;&#039; - Recent Shared Maximum Pay Per Share. Like SMPPS, but system aims to prioritize the most recent miners first. [http://eligius.st/wiki/index.php/Shared_Maximum_PPS]&lt;br /&gt;
* &#039;&#039;&#039;Score&#039;&#039;&#039; - Score based system: a proportional reward, but weighed by time submitted. Each submitted share is worth more in the function of time &#039;&#039;t&#039;&#039; since start of current round. For each share score is updated by: score += exp(t/C). This makes later shares worth much more than earlier shares, thus the miner&#039;s score quickly diminishes when they stop mining on the pool. Rewards are calculated proportionally to scores (and not to shares). (at slush&#039;s pool C=300 seconds, and every hour scores are normalized)&lt;br /&gt;
* &#039;&#039;&#039;SMPPS&#039;&#039;&#039; - Shared Maximum Pay Per Share. Like Pay Per Share, but never pays more than the pool earns. [http://eligius.st/wiki/index.php/Shared_Maximum_PPS]&lt;br /&gt;
&lt;br /&gt;
A statistically valid analysis of some pools and their payout methods: [http://organofcorti.blogspot.com/ Bitcoin network and pool analysis]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name                !! Location             !! Size&amp;lt;ref name=&amp;quot;hashrate2&amp;quot;/&amp;gt;&lt;br /&gt;
!                                                         Merged Mining&amp;lt;ref name=&amp;quot;merged&amp;quot;/&amp;gt;&lt;br /&gt;
!                                                                    Reward Type             !! Transaction fees!!PPS Fee!!Other Fee!! [[File:Stm.png|link=Stratum_mining_protocol]] !! [[getblocktemplate|GBT]]&lt;br /&gt;
! Launched   !! Variance                     !! Forum                                       !! Website&lt;br /&gt;
|-&lt;br /&gt;
| [[AntPool]]         || China                || Large || No       || PPLNS &amp;amp; PPS             || {{PoolFees}}    || 2.5%  || 0%      || {{Yes}} || {{No}}&lt;br /&gt;
| ?          || ?                            || [https://bitcointalk.org/index.php?topic=855548 link]  || [https://www.antpool.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTC.com Pool]]         || China                || Medium || Yes       || PPS             || {{PoolFees}}    || 1.5%  || 0%      || {{Yes}} || {{No}}&lt;br /&gt;
| 2016-09-13          || ?                            || ?  || [https://pool.btc.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BCMonster.com]]        ||{{flag|us|}}{{flag|eu}}{{flag|cn|}} || Small || No      || PPLNS                  || {{SharedFees}}   ||       ||      0.5% || {{Yes}} || {{No}}&lt;br /&gt;
| 2016-01-13 ||   Dynamic ||   [https://bitcointalk.org/index.php?topic=1327077.0  link]                                || [http://www.bcmonster.com  link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BitcoinAffiliateNetwork]]     || {{flag|us|}}{{flag|eu}}{{flag|cn|}}{{flag|nl|}}{{flag|au|}}      ||   ?   || [[NMC]], [[DOGE]] || ?         || {{PoolFees}}     ||   ? ||    ?    ||    {{Yes}}     ||&lt;br /&gt;
| 2014-07-15 || User/Dynamic           || [https://bitcointalk.org/index.php?topic=722202.0  link] || [http://mining.bitcoinaffiliatenetwork.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Bitcoin Pooled Mining|Slush&#039;s pool (mining.bitcoin.cz)]]&lt;br /&gt;
|                        Global               || Medium || No || Score                   || {{SharedFees}}   ||      ||      2% || {{Yes}} || {{No}}&lt;br /&gt;
| 2010-11-27 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=1976   link] || [http://mining.bitcoin.cz/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BitMinter]]       || {{flag|us}}{{flag|de}}          || Small || [[NMC]] || PPLNSG                  || {{SharedFees}}   ||      ||      1% || {{Yes}} || {{No}}&lt;br /&gt;
| 2011-06-26 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic || [https://bitcointalk.org/?topic=788753  link] || [https://bitminter.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTCC Pool]]            || China, Japan       || Large     || [[NMC]]       || PPS                       || {{PoolFees}}    || 2.0%     || 0%       || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2014-10-21           ||  Dynamic                            || ?                                      || [https://pool.btcc.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BTCDig]]         || {{flag|us|label=1}}||    Small || No      || DGM                   || {{PoolFees}}     ||      ||      0% ||  {{Yes}}     ||&lt;br /&gt;
| 2013-07-04 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic 20SPM                      || [https://bitcointalk.org/index.php?topic=249627   link] || [http://btcdig.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[btcmp.com]]       || {{flag|de|label=1}}||    Small || No      || PPS                     || {{PoolFees}}     ||   4% ||  || {{Yes}} ||&lt;br /&gt;
| 2011-06-28 || Diff 1                       ||                                             || [http://www.btcmp.com/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[BW Mining]]      || China                || Medium || ?       || PPLNS &amp;amp; PPS             || ?               || ?     || ?       || {{Yes}} ||&lt;br /&gt;
| ?          || ?                            || ?                                           || [https://www.bw.com/pool link]&lt;br /&gt;
|-&lt;br /&gt;
| [[CKPool]]         || {{flag|us}}{{flag|sg}}{{flag|de}}{{flag|jp}}{{flag|fr}}{{flag|nl}} || Medium || No      || PPLNSG                || {{SharedFees}}     ||      ||      0.9% || {{Yes}} || {{No}}&lt;br /&gt;
| 2014-09-20 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic 18SPM || [https://bitcointalk.org/index.php?topic=789369.0 link]   || [http://www.kano.is link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Eclipse Mining Consortium]]&lt;br /&gt;
|                   Global ||  Small || No      || DGM &amp;amp; PPS                 || {{PoolFees}}     ||   5% ||      0% || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2011-06-14 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt;/Dynamic&lt;br /&gt;
|                                               [http://bitcointalk.org/?topic=16385  link] || [https://eclipsemc.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Eligius]]         || {{flag|us|label=1}}|| Small || [[NMC]]  || CPPSRB                  || {{SharedFees}}   ||    ||     0%    || {{Yes}} || {{Yes}}&lt;br /&gt;
| 2011-04-27 || Dynamic: 32 shares/m         || [https://bitcointalk.org/?topic=441465  link] || [http://eligius.st link]&lt;br /&gt;
|-&lt;br /&gt;
| [[F2Pool]]          || {{flag|cn|}}{{flag|us|}}                || Large || NMC, DOGE, HUC       || PPS                     || {{PoolFees}}    || 3%    ||         || {{Yes}} || {{No}}&lt;br /&gt;
| 2013-05-05 || Dynamic               || [https://bitcointalk.org/index.php?topic=700411.0 link] || [https://www.f2pool.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[GHash.IO]]        || {{flag|nl|label=1}}|| Small || [[NMC]], IXC, [[Devcoin]]      || PPLNS                  || {{SharedFees}}   ||       ||      0% || {{Yes}} || {{No}}&lt;br /&gt;
| 2013-07-01 ||           User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; ||   [https://support.cex.io  link]                                || [https://ghash.io/  link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Give Me COINS]]   || {{flag|us}}{{flag|eu}}          || Small || [[NMC]]   || PPLNS                  || {{SharedFees}}     ||    ||  0%|| {{Yes}} || {{Yes}}&lt;br /&gt;
| 2013-08-12 || Dynamic         || [https://bitcointalk.org/index.php?topic=272017.0  link] || [http://give-me-coins.com link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Merge Mining Pool]]      || {{flag|us|label=1}}|| Small || [[NMC]], IXC, [[Devcoin]]&lt;br /&gt;
|                                                                    DGM                     || {{SharedFees}}     ||      || 1.5%    || {{Yes}}    || {{No}}&lt;br /&gt;
| 2012-01-08 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=57148  link] || [http://mmpool.org link]&lt;br /&gt;
|-&lt;br /&gt;
| [[Multipool]]          || {{flag|us}}{{flag|eu}}      ||   Small || [[NMC]] || Score                     || {{SharedFees}}     ||      ||      1.5% ||     {{Yes}}     || {{No}}&lt;br /&gt;
| 2012-03-15 || User                       || [https://bitcointalk.org/index.php?topic=311067.0  link] || [https://www.multipool.us/ link]&lt;br /&gt;
|-&lt;br /&gt;
| [[P2Pool]]          || Global (p2p)          ||   Small || Solo&amp;lt;ref name=&amp;quot;solomm&amp;quot;/&amp;gt; || PPLNS  || {{SharedFees}}   ||      ||      0% || {{Yes}} || {{No}}&lt;br /&gt;
| 2011-06-17 || User&amp;lt;ref name=&amp;quot;changeable&amp;quot;/&amp;gt; || [http://bitcointalk.org/?topic=18313  link] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[PolMine]]        || {{flag|pl|label=1}}||  Small || [[NMC]]      || SMPPS                  || {{SharedFees}}  ||  ||   0%     || {{Yes}}        || {{Yes}}	 	&lt;br /&gt;
| 2011-06-13 || Dynamic/User                      || [http://forum.polmine.pl/ link]            || [https://polmine.pl/?setlang=en link]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SPV Mining / Old Bitcoin Core ==&lt;br /&gt;
&lt;br /&gt;
The following pools are known or strongly suspected to be mining on top of blocks before fully validating them with Bitcoin Core 0.9.5 or later.  Miners doing this have already lost over $50,000 USD during the 4 July 2015 fork and have created a situation where small numbers of confirmations are much less useful than they normally are.&lt;br /&gt;
&lt;br /&gt;
* BTC Nuggets&lt;br /&gt;
* [https://www.f2pool.com/ F2Pool]&amp;lt;ref name=&amp;quot;spv_despite_incident&amp;quot;&amp;gt;[https://bitcointalk.org/index.php?topic=700411.msg11790734#msg11790734 Intention to continue SPV mining], Wang Chun, 4 July 2015&amp;lt;/ref&amp;gt;&lt;br /&gt;
* AntPool&amp;lt;ref name=&amp;quot;spv_despite_incident&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pools are believed to be currently fully validating blocks with Bitcoin Core 0.9.5 or later (0.10.2 or later recommended due to DoS vulnerabilities):&lt;br /&gt;
&lt;br /&gt;
* [[BitMinter]]&lt;br /&gt;
* BTC China (described as SPV mining&amp;lt;ref name=&amp;quot;spv_despite_incident&amp;quot; /&amp;gt;, but they&#039;re performing effective valiation)&lt;br /&gt;
* [[CKPool]]&lt;br /&gt;
* [[Eligius]]&lt;br /&gt;
* [[P2Pool]]&lt;br /&gt;
* [[Bitcoin Pooled Mining|Slush Pool]]&lt;br /&gt;
* [[BCMonster.com]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;hashrate2&amp;quot;&amp;gt;Note that pool hashrate is largely irrelevant but can be seen as a popularity measurement. It is a theoretical security issue if one pool gains above 50% of the total computational power of the network, thus consider joining a pool based on other metrics. The pool&#039;s total hash rate is very dynamic on most pools. Over time, as the network grows, so does most pool&#039;s hash rates. The displayed values are the pool&#039;s relative sizes based on the network: Small: less than 2%, Medium: 2%-10% Large: greater than 10% of the network.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;merged&amp;quot;&amp;gt;Merged mining allows miners to mine on multiple [[block chains]] at the same time with the same hashing.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref name=&amp;quot;changeable&amp;quot;&amp;gt;The difficulty of the shares can be changed by the user.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;solomm&amp;quot;&amp;gt;Merged mining can be done on a &amp;quot;solo mining&amp;quot; basis (payouts in the merged chain are not pooled).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Pooled mining]]&lt;br /&gt;
* [https://www.blocktrail.com/BTC/pools Pool Distribution Summary]&lt;br /&gt;
* [https://www.bitcoinmining.com/ Bitcoin Mining]&lt;br /&gt;
* [https://www.youtube.com/watch?v=GmOzih6I1zs Video: What is Bitcoin Mining]&lt;br /&gt;
* [https://www.bitcoinmining.com/bitcoin-mining-pools/ Bitcoin Mining Pools]&lt;br /&gt;
* [https://bitcoinchain.com/pools Bitcoin Mining Pools Comparison]&lt;br /&gt;
[[Category:Mining]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61448</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61448"/>
		<updated>2016-08-15T07:59:16Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Firmware, MM Firmware 2016-08-15 released */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3 Model B&lt;br /&gt;
* Sync with OpenWrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-08-15/ 2016-08-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601608-6dffde40&#039;&#039;&#039;&lt;br /&gt;
* Update: Update led status&lt;br /&gt;
&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-07-15/ 2016-07-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601607-2a78bc90&#039;&#039;&#039;&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 wget https://raw.githubusercontent.com/Johnson-Fan/Avalon-USB-converter/master/patches/001-add-milli_sleep.patch&lt;br /&gt;
&lt;br /&gt;
 patch -p0 &amp;lt; 001-add-milli_sleep.patch&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61376</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61376"/>
		<updated>2016-07-28T03:41:24Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* 20160726, Minor changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3 Model B&lt;br /&gt;
* Sync with OpenWrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-07-15/ 2016-07-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601607-2a78bc90&#039;&#039;&#039;&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61375</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61375"/>
		<updated>2016-07-28T03:37:37Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* 20160726, Typo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with OpenWrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-07-15/ 2016-07-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601607-2a78bc90&#039;&#039;&#039;&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61374</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61374"/>
		<updated>2016-07-28T03:26:14Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* 20160726, use the verbatim link */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with Openwrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-07-15/ 2016-07-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601607-2a78bc90&#039;&#039;&#039;&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61373</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61373"/>
		<updated>2016-07-28T03:21:07Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Firmware, MM Firmware 2016-07-15 released */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with Openwrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [https://canaan.io/downloads/software/avalon6/mm/2016-07-15/ 2016-07-15] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601607-2a78bc90&#039;&#039;&#039;&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61372</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61372"/>
		<updated>2016-07-28T03:17:30Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware, RPi Firmware, 20160726 released */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[https://canaan.io/downloads/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160726/ 20160726] ===&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with Openwrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61297</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61297"/>
		<updated>2016-07-15T02:00:50Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING, Update MM60 firmware next testing  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with Openwrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
* Fix: 50% off hash rate bug&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61296</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61296"/>
		<updated>2016-07-15T02:00:08Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING , Update OpenWrt next testing firmware for Avalon6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
* Support Raspberry Pi 3&lt;br /&gt;
* Sync with Openwrt master branch (cac971da)&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=61291</id>
		<title>Avalon nano</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=61291"/>
		<updated>2016-07-13T04:12:55Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It&#039;s a usb dongle, using only one A3233.&lt;br /&gt;
&lt;br /&gt;
== Hardware version 1.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x1FC9/0x0083&lt;br /&gt;
* Icarus protocol support&lt;br /&gt;
* It use USB CDC, without need driver installation under Linux&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
&lt;br /&gt;
Note:  You may need install driver for windows before usage. Please down it here &amp;lt;ref&amp;gt;http://www.lpcware.com/system/files/lpcopen_examples_windows_usb_drivers_v1_10_0.zip&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support CGMiner, BFGMiner and AvalonMiner(Based on BFGMiner) for now.&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon-usb -b avalon-usb&lt;br /&gt;
 ./autogen.sh --enable-icarus&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
* Patches&lt;br /&gt;
 Patch for Canaan Creative&#039;s CGMiner: [http://downloads.canaan-creative.com/software/avalon_nano/patches/001-avalon3-nano.patch 001-avalon3-nano.patch]&lt;br /&gt;
 For what: CGMiner patch.&lt;br /&gt;
 From where: Based c5ec1171@https://github.com/Canaan-Creative/cgminer/tree/avalon2&lt;br /&gt;
 Comments: &lt;br /&gt;
  	Support avalon3 nano in cgminer.&lt;br /&gt;
  	Support Icarus protocol.&lt;br /&gt;
&lt;br /&gt;
==== BFGMiner ====&lt;br /&gt;
* Run&lt;br /&gt;
  &#039;&#039;&#039;Run under Linux&#039;&#039;&#039;&lt;br /&gt;
  ./bfgminer \&lt;br /&gt;
        -S ICA:/dev/ttyACMx \&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 \&lt;br /&gt;
        --set-device ICA:baud=115200 \&lt;br /&gt;
        --set-device ICA:reopen=timeout \&lt;br /&gt;
        --set-device ICA:work_division=1 \&lt;br /&gt;
        --set-device ICA:fpga_count=1 \&lt;br /&gt;
        --set-device ICA:probe_timeout=100 \&lt;br /&gt;
        --set-device ICA:timing=0.22 \&lt;br /&gt;
        --api-listen \&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Run under Windows&#039;&#039;&#039;&lt;br /&gt;
  bfgminer.exe ^&lt;br /&gt;
        -S ICA:\\.\COMn ^&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 ^&lt;br /&gt;
        --set-device ICA:baud=115200 ^&lt;br /&gt;
        --set-device ICA:reopen=timeout ^&lt;br /&gt;
        --set-device ICA:work_division=1 ^&lt;br /&gt;
        --set-device ICA:fpga_count=1 ^&lt;br /&gt;
        --set-device ICA:probe_timeout=100 ^&lt;br /&gt;
        --set-device ICA:timing=0.22 ^&lt;br /&gt;
        --api-listen ^&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
  &lt;br /&gt;
  Note: See the details about the timing in README. It works ~4GH/s(400 * 11.8) at 400MHz.&lt;br /&gt;
  timing = (1 / (4 * 10 ** 9)) * 10 ** 9 (python format)&lt;br /&gt;
&lt;br /&gt;
* MHS Cur calculation&lt;br /&gt;
  MHS Cur = Diff1 Work * (Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale)) * 60/ Elapsed * 71582788 / 1000000&lt;br /&gt;
  Note：&lt;br /&gt;
  1.if Difficulty Accepted + Difficulty Rejected + Difficulty Stale = 0, then Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale) = 1.&lt;br /&gt;
  2.Get all the infomation through ./bfgminer-rpc -o summary&lt;br /&gt;
&lt;br /&gt;
* BFGMiner release from luck.dashjr&lt;br /&gt;
  http://luke.dashjr.org/programs/bitcoin/files/bfgminer/&lt;br /&gt;
&lt;br /&gt;
==== AvalonMiner ====&lt;br /&gt;
It is developed under Windows with Chinese UI only, You can import the solution and crack it by yourself. It is distributed under UNLICENSE.Source code can be download here: &amp;lt;ref&amp;gt;https://github.com/Canaan-Creative/Avalon-nano/tree/master/gui_1.0&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Release =====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140911/ 20140911]&lt;br /&gt;
* Avalon3 nano windows miner(20140911)&lt;br /&gt;
* Beautifull GUI &lt;br /&gt;
* Auto detect Avalon nano&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140803/ 20140803]&lt;br /&gt;
* Avalon3 nano windows miner(20140803) first version&lt;br /&gt;
* Support bfgminer only&lt;br /&gt;
* Support icarus protocal&lt;br /&gt;
&lt;br /&gt;
===== Run or Debug with CLI =====&lt;br /&gt;
# Copy BfgMiner to a safe place.&lt;br /&gt;
# Uninstall Avalon GUI Miner&lt;br /&gt;
# Modify the icadbg.cmd(under BfgMiner folder) with your correct com port.&lt;br /&gt;
# Double click icadbg.cmd.&lt;br /&gt;
Note: BFGMiner location: (C:\Program Files (x86)\Avalon Nano\BfgMiner)&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
==== Schematics ====&lt;br /&gt;
* [http://downloads.canaan-creative.com/software/avalon_nano/doc/sch/Avalon_usb_sch.pdf Avalon-usb schematics]&lt;br /&gt;
&lt;br /&gt;
==== LPC11U14 Spec ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type || Infomation&lt;br /&gt;
|-&lt;br /&gt;
| Processor || NXP&#039;s Cortex-M0 LPC11U14 microcontroller&lt;br /&gt;
|-&lt;br /&gt;
| Flash || 32 kB&lt;br /&gt;
|-  &lt;br /&gt;
| Data Memory || 6 kB&lt;br /&gt;
|-&lt;br /&gt;
| Clock Crystals || 12.000 MHz crystal for CPU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Clock ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type  ||  Value&lt;br /&gt;
|-&lt;br /&gt;
| LPC11U14 (External)    ||   48.000 MHz &lt;br /&gt;
|-&lt;br /&gt;
| A3233 XCLK (From LPC11U14)  ||   24.000 MHz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== LED ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Color || Memo&lt;br /&gt;
|-&lt;br /&gt;
| Green || Idle status&lt;br /&gt;
|-&lt;br /&gt;
| Red/Blue || Working (Frequency high -&amp;gt; low,led red -&amp;gt; blue)&lt;br /&gt;
|-&lt;br /&gt;
| Red blinking || Overheating&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Programmer ====&lt;br /&gt;
* SmartPro 5000U-Plus&lt;br /&gt;
&lt;br /&gt;
==== SWD Debuger ====&lt;br /&gt;
LPC11U14 only support swd debug.&lt;br /&gt;
The debugger can also be used to program the LPC11U14 chip.&lt;br /&gt;
===== LPCXpresso =====&lt;br /&gt;
* Installation and Activation&lt;br /&gt;
  LPCXpresso download link &amp;lt;ref&amp;gt;https://www.lpcware.com/lpcxpresso/download&amp;lt;/ref&amp;gt;&lt;br /&gt;
  Free Edition is enough. Then activate it. &amp;lt;ref&amp;gt;http://www.lpcware.com/lpcxpresso/activate&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LPC-Link diagnostics&lt;br /&gt;
  Diagnostics when connecting to LPC-Link&lt;br /&gt;
  &lt;br /&gt;
  1.  lpc-link info&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-emu -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  2.  target info &lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-target -pLPC11U14/201 -wire=winusb -4&lt;br /&gt;
  &lt;br /&gt;
  3. burn and run axf file&lt;br /&gt;
  crt_emu_lpc11_13_nxp -pLPC11U14/201 -wire=winusb -flash-load-exec nxp_lpcxpresso_11u14_periph_blinky.axf&lt;br /&gt;
  &lt;br /&gt;
  4. info scan&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-scan -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  5. semi_host debug&lt;br /&gt;
  use newlib semihost&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on OSX)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U14/201 -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on Ubuntu14.04)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_lpc11_13_nxp -g -mi -2 -pLPC11U14/201 -vendor=NXP -e0 -wire=winUSB -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
&lt;br /&gt;
    Then you can use gdb as you want&lt;br /&gt;
&lt;br /&gt;
===== ULINK 2 =====&lt;br /&gt;
* Configure ULINK2 for LPCXpresso&lt;br /&gt;
 1.Change boot mode to CMSIS-DAP&lt;br /&gt;
 Use the [http://www.keil.com/support/man/docs/ulink2/ulink2_boot_mode.htm Boot Mode Utility] to change the mode like this: UL2_Configure B1.&lt;br /&gt;
 &lt;br /&gt;
 2.Set jumper to 3.3V position&lt;br /&gt;
 See [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_jumpers.htm  Jumpers]&lt;br /&gt;
 &lt;br /&gt;
 3.Connect Avalon nano to ULINK2&lt;br /&gt;
 Check [http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections SWD Connector Pinout], need connect SCLK,SWIO,GND only.&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Reflash ====&lt;br /&gt;
* Avalon3 nano firmware burner &amp;lt;ref&amp;gt;http://downloads.canaan-creative.com/software/avalon_nano/burner&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140523/ 20140523]&lt;br /&gt;
* Avalon3 nano firmware(20140523-dd84b993)&lt;br /&gt;
* Support nonce receive timeout check&lt;br /&gt;
* Support adjust freq for 100Mhz to 360Mhz,freq value after reset is 360Mhz&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140519/ 20140519]&lt;br /&gt;
* Avalon3 nano firmware(20140519-8c38877c):first version&lt;br /&gt;
* Avalon3 nano test scripts found here:[https://github.com/BitSyncom/avalon-extras/tree/master/scripts a3233_avalon_usb_testbench.sh]&lt;br /&gt;
* Support adjust freq for 360Mhz to 400Mhz,value after reset is 400Mhz&lt;br /&gt;
* Include avalon3 nano module test(avalon_bsp_testben)&lt;br /&gt;
* bfgminer(0676fa314a9cc1491ad2e5f5c6a5e97f38fa67e3),how to run:http://wiki.0xf8.com/index.php/Bfgminer&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/nexttesting/ NEXT-TESTING]&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Adjust LED color according to the temperature&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
* https://bitcointalk.org/index.php?topic=1022764.0&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
* OpenOCD is not support ULINK2 (See src/jtag/drivers/ulink.c)&lt;br /&gt;
&lt;br /&gt;
== Hardware version 2.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x29F1/0x33F3&lt;br /&gt;
* [https://github.com/Canaan-Creative/MM/blob/avalon4/firmware/doc/protocol.md MM protocol] support&lt;br /&gt;
* It use HID CDC, without need driver installation.&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
* Current：0.018A ~ 0.917A&lt;br /&gt;
* Voltage：4.97V ~ 5.179V&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support Avalon miner, CGMiner for now.&lt;br /&gt;
==== Avalon miner ====&lt;br /&gt;
The easiest way to mining.&lt;br /&gt;
# [https://chrome.google.com/webstore/detail/avalon-miner/odlgkocclgbbahkiajhldmlbmefpcjnc?hl=en-US Install from chrome web store]&lt;br /&gt;
# [http://downloads.canaan-creative.com/software/avalon_nano2/app/Avalon_miner_latest.crx Install from local crx]&lt;br /&gt;
&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon-miner&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass&lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== [https://en.bitcoin.it/wiki/Avalon_nano#Hardware Hardware] ===&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://build.canaan-creative.com:8080/~mikeqin/avalonnano2/ Daily Building]&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano2/firmware/2015-08-25/ 2015-08-25]&lt;br /&gt;
* Avalon nano 2.0 firmware (3U1505-4481b7e0): first version&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
* How to debug Avalon miner App under Chrome browser ?&lt;br /&gt;
# Enter the follow under the address bar.&lt;br /&gt;
#:chrome://extensions/&lt;br /&gt;
# Change to Developer mode in the right corner.&lt;br /&gt;
# Select Avalon miner background page, Enable console log in the Developer Tools. Filter: Status&lt;br /&gt;
#:utils.enableLog()&lt;br /&gt;
# Then open Avalon miner App, and update Pool Settings, then Enter mining.&lt;br /&gt;
You can check firmware version in the Miner App, and check the Status in the Developer Tools.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forge update your device permission under Linux.&lt;br /&gt;
&lt;br /&gt;
Under Ubuntu 14.04 LTS, you can add a rules under /etc/udev/rules.d, Make sure the user is a part of plugdev group&lt;br /&gt;
&lt;br /&gt;
The content of the rules is :&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;29f1&amp;quot;, ATTRS{idProduct}==&amp;quot;33f3&amp;quot;, GROUP=&amp;quot;plugdev&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
* Baremetal programming&lt;br /&gt;
** http://eleceng.dit.ie/frank/arm/BareMetalLPC1114/index.html&lt;br /&gt;
** http://eewiki.net/display/microcontroller/Getting+Started+with+NXP%27s+LPC11XX+Cortex-M0+ARM+Microcontrollers&lt;br /&gt;
** http://tech.munts.com/MCU/Frameworks/RaspberryPi/expansion/LPC1114/&lt;br /&gt;
* ULINK2&lt;br /&gt;
** [http://www.keil.com/support/docs/3632.htm ULINK: How to downgrade the firmware of ULINK2/ME]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_fw_upgrade.htm Firmware Upgrade Utility]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_trblsh_hwcheck.htm Hardware Checklist]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/uv4/uv4_cl_programflash.htm Program Flash Example]&lt;br /&gt;
* LPC-Link&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/BootingLPCLink?highlight=%28dfu%5C-util%29 Booting LPC-Link]&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics?highlight=%28dfu%5C-util%29 Diagnostics when connecting to LPC-Link]&lt;br /&gt;
* [http://www.keil.com/support/man/docs/dapdebug/dapdebug_introduction.htm About CMSIS-DAP]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/an11321-porting-cmsis-dap-debugger-cortex-m0-platform Porting the CMSIS-DAP debugger to the Cortex-M0 platform]&lt;br /&gt;
* [http://microcontrollershop.com/product_info.php?products_id=4838 LPC11U14 ARM Cortex-M0 Board]&lt;br /&gt;
* [http://www.lpcware.com/content/blog/application-programming-iap-code-example In-Application Programming (IAP) Code Example]&lt;br /&gt;
* Software for flashing / upgrading firmware&lt;br /&gt;
** [http://www.lpcware.com/lpcxpresso/download LPCXpresso] (SWD method)&lt;br /&gt;
* [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm Target Connectors]&lt;br /&gt;
* [https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access Regaining debug access to target MCU]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=61290</id>
		<title>Avalon nano</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=61290"/>
		<updated>2016-07-13T04:00:13Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Add FAQ,How to debug Avalon miner App under Chrome browser? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It&#039;s a usb dongle, using only one A3233.&lt;br /&gt;
&lt;br /&gt;
== Hardware version 1.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x1FC9/0x0083&lt;br /&gt;
* Icarus protocol support&lt;br /&gt;
* It use USB CDC, without need driver installation under Linux&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
&lt;br /&gt;
Note:  You may need install driver for windows before usage. Please down it here &amp;lt;ref&amp;gt;http://www.lpcware.com/system/files/lpcopen_examples_windows_usb_drivers_v1_10_0.zip&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support CGMiner, BFGMiner and AvalonMiner(Based on BFGMiner) for now.&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon-usb -b avalon-usb&lt;br /&gt;
 ./autogen.sh --enable-icarus&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
* Patches&lt;br /&gt;
 Patch for Canaan Creative&#039;s CGMiner: [http://downloads.canaan-creative.com/software/avalon_nano/patches/001-avalon3-nano.patch 001-avalon3-nano.patch]&lt;br /&gt;
 For what: CGMiner patch.&lt;br /&gt;
 From where: Based c5ec1171@https://github.com/Canaan-Creative/cgminer/tree/avalon2&lt;br /&gt;
 Comments: &lt;br /&gt;
  	Support avalon3 nano in cgminer.&lt;br /&gt;
  	Support Icarus protocol.&lt;br /&gt;
&lt;br /&gt;
==== BFGMiner ====&lt;br /&gt;
* Run&lt;br /&gt;
  &#039;&#039;&#039;Run under Linux&#039;&#039;&#039;&lt;br /&gt;
  ./bfgminer \&lt;br /&gt;
        -S ICA:/dev/ttyACMx \&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 \&lt;br /&gt;
        --set-device ICA:baud=115200 \&lt;br /&gt;
        --set-device ICA:reopen=timeout \&lt;br /&gt;
        --set-device ICA:work_division=1 \&lt;br /&gt;
        --set-device ICA:fpga_count=1 \&lt;br /&gt;
        --set-device ICA:probe_timeout=100 \&lt;br /&gt;
        --set-device ICA:timing=0.22 \&lt;br /&gt;
        --api-listen \&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Run under Windows&#039;&#039;&#039;&lt;br /&gt;
  bfgminer.exe ^&lt;br /&gt;
        -S ICA:\\.\COMn ^&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 ^&lt;br /&gt;
        --set-device ICA:baud=115200 ^&lt;br /&gt;
        --set-device ICA:reopen=timeout ^&lt;br /&gt;
        --set-device ICA:work_division=1 ^&lt;br /&gt;
        --set-device ICA:fpga_count=1 ^&lt;br /&gt;
        --set-device ICA:probe_timeout=100 ^&lt;br /&gt;
        --set-device ICA:timing=0.22 ^&lt;br /&gt;
        --api-listen ^&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
  &lt;br /&gt;
  Note: See the details about the timing in README. It works ~4GH/s(400 * 11.8) at 400MHz.&lt;br /&gt;
  timing = (1 / (4 * 10 ** 9)) * 10 ** 9 (python format)&lt;br /&gt;
&lt;br /&gt;
* MHS Cur calculation&lt;br /&gt;
  MHS Cur = Diff1 Work * (Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale)) * 60/ Elapsed * 71582788 / 1000000&lt;br /&gt;
  Note：&lt;br /&gt;
  1.if Difficulty Accepted + Difficulty Rejected + Difficulty Stale = 0, then Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale) = 1.&lt;br /&gt;
  2.Get all the infomation through ./bfgminer-rpc -o summary&lt;br /&gt;
&lt;br /&gt;
* BFGMiner release from luck.dashjr&lt;br /&gt;
  http://luke.dashjr.org/programs/bitcoin/files/bfgminer/&lt;br /&gt;
&lt;br /&gt;
==== AvalonMiner ====&lt;br /&gt;
It is developed under Windows with Chinese UI only, You can import the solution and crack it by yourself. It is distributed under UNLICENSE.Source code can be download here: &amp;lt;ref&amp;gt;https://github.com/Canaan-Creative/Avalon-nano/tree/master/gui_1.0&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Release =====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140911/ 20140911]&lt;br /&gt;
* Avalon3 nano windows miner(20140911)&lt;br /&gt;
* Beautifull GUI &lt;br /&gt;
* Auto detect Avalon nano&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140803/ 20140803]&lt;br /&gt;
* Avalon3 nano windows miner(20140803) first version&lt;br /&gt;
* Support bfgminer only&lt;br /&gt;
* Support icarus protocal&lt;br /&gt;
&lt;br /&gt;
===== Run or Debug with CLI =====&lt;br /&gt;
# Copy BfgMiner to a safe place.&lt;br /&gt;
# Uninstall Avalon GUI Miner&lt;br /&gt;
# Modify the icadbg.cmd(under BfgMiner folder) with your correct com port.&lt;br /&gt;
# Double click icadbg.cmd.&lt;br /&gt;
Note: BFGMiner location: (C:\Program Files (x86)\Avalon Nano\BfgMiner)&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
==== Schematics ====&lt;br /&gt;
* [http://downloads.canaan-creative.com/software/avalon_nano/doc/sch/Avalon_usb_sch.pdf Avalon-usb schematics]&lt;br /&gt;
&lt;br /&gt;
==== LPC11U14 Spec ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type || Infomation&lt;br /&gt;
|-&lt;br /&gt;
| Processor || NXP&#039;s Cortex-M0 LPC11U14 microcontroller&lt;br /&gt;
|-&lt;br /&gt;
| Flash || 32 kB&lt;br /&gt;
|-  &lt;br /&gt;
| Data Memory || 6 kB&lt;br /&gt;
|-&lt;br /&gt;
| Clock Crystals || 12.000 MHz crystal for CPU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Clock ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type  ||  Value&lt;br /&gt;
|-&lt;br /&gt;
| LPC11U14 (External)    ||   48.000 MHz &lt;br /&gt;
|-&lt;br /&gt;
| A3233 XCLK (From LPC11U14)  ||   24.000 MHz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== LED ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Color || Memo&lt;br /&gt;
|-&lt;br /&gt;
| Green || Idle status&lt;br /&gt;
|-&lt;br /&gt;
| Red/Blue || Working (Frequency high -&amp;gt; low,led red -&amp;gt; blue)&lt;br /&gt;
|-&lt;br /&gt;
| Red blinking || Overheating&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Programmer ====&lt;br /&gt;
* SmartPro 5000U-Plus&lt;br /&gt;
&lt;br /&gt;
==== SWD Debuger ====&lt;br /&gt;
LPC11U14 only support swd debug.&lt;br /&gt;
The debugger can also be used to program the LPC11U14 chip.&lt;br /&gt;
===== LPCXpresso =====&lt;br /&gt;
* Installation and Activation&lt;br /&gt;
  LPCXpresso download link &amp;lt;ref&amp;gt;https://www.lpcware.com/lpcxpresso/download&amp;lt;/ref&amp;gt;&lt;br /&gt;
  Free Edition is enough. Then activate it. &amp;lt;ref&amp;gt;http://www.lpcware.com/lpcxpresso/activate&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LPC-Link diagnostics&lt;br /&gt;
  Diagnostics when connecting to LPC-Link&lt;br /&gt;
  &lt;br /&gt;
  1.  lpc-link info&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-emu -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  2.  target info &lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-target -pLPC11U14/201 -wire=winusb -4&lt;br /&gt;
  &lt;br /&gt;
  3. burn and run axf file&lt;br /&gt;
  crt_emu_lpc11_13_nxp -pLPC11U14/201 -wire=winusb -flash-load-exec nxp_lpcxpresso_11u14_periph_blinky.axf&lt;br /&gt;
  &lt;br /&gt;
  4. info scan&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-scan -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  5. semi_host debug&lt;br /&gt;
  use newlib semihost&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on OSX)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U14/201 -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on Ubuntu14.04)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_lpc11_13_nxp -g -mi -2 -pLPC11U14/201 -vendor=NXP -e0 -wire=winUSB -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
&lt;br /&gt;
    Then you can use gdb as you want&lt;br /&gt;
&lt;br /&gt;
===== ULINK 2 =====&lt;br /&gt;
* Configure ULINK2 for LPCXpresso&lt;br /&gt;
 1.Change boot mode to CMSIS-DAP&lt;br /&gt;
 Use the [http://www.keil.com/support/man/docs/ulink2/ulink2_boot_mode.htm Boot Mode Utility] to change the mode like this: UL2_Configure B1.&lt;br /&gt;
 &lt;br /&gt;
 2.Set jumper to 3.3V position&lt;br /&gt;
 See [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_jumpers.htm  Jumpers]&lt;br /&gt;
 &lt;br /&gt;
 3.Connect Avalon nano to ULINK2&lt;br /&gt;
 Check [http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections SWD Connector Pinout], need connect SCLK,SWIO,GND only.&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Reflash ====&lt;br /&gt;
* Avalon3 nano firmware burner &amp;lt;ref&amp;gt;http://downloads.canaan-creative.com/software/avalon_nano/burner&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140523/ 20140523]&lt;br /&gt;
* Avalon3 nano firmware(20140523-dd84b993)&lt;br /&gt;
* Support nonce receive timeout check&lt;br /&gt;
* Support adjust freq for 100Mhz to 360Mhz,freq value after reset is 360Mhz&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140519/ 20140519]&lt;br /&gt;
* Avalon3 nano firmware(20140519-8c38877c):first version&lt;br /&gt;
* Avalon3 nano test scripts found here:[https://github.com/BitSyncom/avalon-extras/tree/master/scripts a3233_avalon_usb_testbench.sh]&lt;br /&gt;
* Support adjust freq for 360Mhz to 400Mhz,value after reset is 400Mhz&lt;br /&gt;
* Include avalon3 nano module test(avalon_bsp_testben)&lt;br /&gt;
* bfgminer(0676fa314a9cc1491ad2e5f5c6a5e97f38fa67e3),how to run:http://wiki.0xf8.com/index.php/Bfgminer&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/nexttesting/ NEXT-TESTING]&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Adjust LED color according to the temperature&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
* https://bitcointalk.org/index.php?topic=1022764.0&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
* OpenOCD is not support ULINK2 (See src/jtag/drivers/ulink.c)&lt;br /&gt;
&lt;br /&gt;
== Hardware version 2.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x29F1/0x33F3&lt;br /&gt;
* [https://github.com/Canaan-Creative/MM/blob/avalon4/firmware/doc/protocol.md MM protocol] support&lt;br /&gt;
* It use HID CDC, without need driver installation.&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
* Current：0.018A ~ 0.917A&lt;br /&gt;
* Voltage：4.97V ~ 5.179V&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support Avalon miner, CGMiner for now.&lt;br /&gt;
==== Avalon miner ====&lt;br /&gt;
The easiest way to mining.&lt;br /&gt;
# [https://chrome.google.com/webstore/detail/avalon-miner/odlgkocclgbbahkiajhldmlbmefpcjnc?hl=en-US Install from chrome web store]&lt;br /&gt;
# [http://downloads.canaan-creative.com/software/avalon_nano2/app/Avalon_miner_latest.crx Install from local crx]&lt;br /&gt;
&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon-miner&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass&lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== [https://en.bitcoin.it/wiki/Avalon_nano#Hardware Hardware] ===&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://build.canaan-creative.com:8080/~mikeqin/avalonnano2/ Daily Building]&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano2/firmware/2015-08-25/ 2015-08-25]&lt;br /&gt;
* Avalon nano 2.0 firmware (3U1505-4481b7e0): first version&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
* How to debug Avalon miner App under Chrome browser ?&lt;br /&gt;
# Enter the follow under the address bar.&lt;br /&gt;
#:chrome://extensions/&lt;br /&gt;
# Change to Developer mode in the right corner.&lt;br /&gt;
# Select Avalon miner background page, Enable console log in the Developer Tools. Filter: Status&lt;br /&gt;
#:utils.enableLog()&lt;br /&gt;
# Then open Avalon miner App, and update Pool Settings, then Enter mining.&lt;br /&gt;
You can check firmware version in the Miner App, and check the Status in the Developer Tools.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
* Baremetal programming&lt;br /&gt;
** http://eleceng.dit.ie/frank/arm/BareMetalLPC1114/index.html&lt;br /&gt;
** http://eewiki.net/display/microcontroller/Getting+Started+with+NXP%27s+LPC11XX+Cortex-M0+ARM+Microcontrollers&lt;br /&gt;
** http://tech.munts.com/MCU/Frameworks/RaspberryPi/expansion/LPC1114/&lt;br /&gt;
* ULINK2&lt;br /&gt;
** [http://www.keil.com/support/docs/3632.htm ULINK: How to downgrade the firmware of ULINK2/ME]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_fw_upgrade.htm Firmware Upgrade Utility]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_trblsh_hwcheck.htm Hardware Checklist]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/uv4/uv4_cl_programflash.htm Program Flash Example]&lt;br /&gt;
* LPC-Link&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/BootingLPCLink?highlight=%28dfu%5C-util%29 Booting LPC-Link]&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics?highlight=%28dfu%5C-util%29 Diagnostics when connecting to LPC-Link]&lt;br /&gt;
* [http://www.keil.com/support/man/docs/dapdebug/dapdebug_introduction.htm About CMSIS-DAP]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/an11321-porting-cmsis-dap-debugger-cortex-m0-platform Porting the CMSIS-DAP debugger to the Cortex-M0 platform]&lt;br /&gt;
* [http://microcontrollershop.com/product_info.php?products_id=4838 LPC11U14 ARM Cortex-M0 Board]&lt;br /&gt;
* [http://www.lpcware.com/content/blog/application-programming-iap-code-example In-Application Programming (IAP) Code Example]&lt;br /&gt;
* Software for flashing / upgrading firmware&lt;br /&gt;
** [http://www.lpcware.com/lpcxpresso/download LPCXpresso] (SWD method)&lt;br /&gt;
* [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm Target Connectors]&lt;br /&gt;
* [https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access Regaining debug access to target MCU]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61182</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61182"/>
		<updated>2016-06-13T11:10:16Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* 2016-05-11， Add the minimum difficulty support by Avalon Miner 6.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* The minimum stratum pool difficulty should &amp;gt;= 32 for better performance&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61172</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61172"/>
		<updated>2016-06-07T03:19:08Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Pictures, Upload Fan &amp;amp; Temp control chart */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
=== Fan &amp;amp; Temp control algorithm ===&lt;br /&gt;
* RPi firmware 20160530&lt;br /&gt;
  [[File:Avalon6 fan adj 601605-256e0f00.png | none | 640px]]&lt;br /&gt;
*  RPi firmware 20160125&lt;br /&gt;
  [[File:Avalon6 fan adj 601601-5d8a1270.png | none | 640px]]&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-05-11/ 2016-05-11] ===&lt;br /&gt;
* Version: &#039;&#039;&#039;601605-256e0f00&#039;&#039;&#039;&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Avalon6_fan_adj_601605-256e0f00.png&amp;diff=61171</id>
		<title>File:Avalon6 fan adj 601605-256e0f00.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Avalon6_fan_adj_601605-256e0f00.png&amp;diff=61171"/>
		<updated>2016-06-07T03:13:43Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Avalon6_fan_adj_601601-5d8a1270.png&amp;diff=61170</id>
		<title>File:Avalon6 fan adj 601601-5d8a1270.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Avalon6_fan_adj_601601-5d8a1270.png&amp;diff=61170"/>
		<updated>2016-06-07T03:13:21Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=61147</id>
		<title>P2Pool</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=P2Pool&amp;diff=61147"/>
		<updated>2016-06-01T03:53:03Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* External Links, Fix broken link */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox company&lt;br /&gt;
|name=P2Pool&lt;br /&gt;
|trading_name=P2Pool&lt;br /&gt;
|industry=[[Mining pool]]&lt;br /&gt;
|foundation=July 17, 2011&lt;br /&gt;
|hashrate=1.6 Phash/s&lt;br /&gt;
|website= http://p2pool.in&lt;br /&gt;
}}&lt;br /&gt;
[[Image:P2pool_chain.png‎|thumb|350px|right|Visualization of the P2Pool share chain]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;P2Pool&#039;&#039;&#039; is a decentralized [[Bitcoin]] [[Bitcoin Pool|mining pool]] that works by creating a peer-to-peer network of miner nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;P2Pool creates a new block chain in which the difficulty is adjusted so a new block is found every 30 seconds. The blocks that get into the P2Pool block chain (called the &amp;quot;share chain&amp;quot;) are the same blocks that would get into the Bitcoin block chain, only they have a lower difficulty target. Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network&#039;s difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while. - Unknown author&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Decentralized payout pooling solves the problem of centralized mining pools degrading the decentralization of Bitcoin and avoids the risk of hard to detect theft by pool operators.&lt;br /&gt;
&lt;br /&gt;
Miners are configured to connect to a P2Pool node that can be run locally, alongside the miner. P2Pool users must run a full Bitcoin node which serves the purpose of independently validating transactions and the Bitcoin blockchain. P2Pool also supports merged mining and several alternative blockchains.&lt;br /&gt;
&lt;br /&gt;
P2Pool nodes work on a chain of shares similar to Bitcoin&#039;s blockchain. Each node works on a block that includes payouts to the previous shares&#039; owners and the node itself, which can also result in a share if it meets P2Pool&#039;s difficulty.&lt;br /&gt;
&lt;br /&gt;
Because of the importance of strengthening Bitcoin&#039;s decentralization, some Bitcoin supporters donate to P2Pool miners, resulting in average returns above 100% of the expected reward.&lt;br /&gt;
However, it should be noted that there are other pools (such as [[BitPenny]] and [[Eligius]]) which can provide this same level of decentralization.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
P2Pool shares form a &amp;quot;sharechain&amp;quot; with each share referencing the previous share&#039;s hash. Each share contains a standard Bitcoin block header, some P2Pool-specific data that is used to compute the generation transaction (total subsidy, payout script of this share, a nonce, the previous share&#039;s hash, and the current target for shares), and a Merkle branch linking that generation transaction to the block header&#039;s Merkle hash.&lt;br /&gt;
&lt;br /&gt;
The chain continuously regulates its target to keep generation around one share every thirty seconds, just as Bitcoin regulates it to generate one block every ten minutes.&lt;br /&gt;
This means that finding shares becomes more difficult (resulting in higher variance) the more people mine on P2Pool, though large miners have the option to raise their difficulty, and so reduce the impact of their mining on P2Pool&#039;s minimum difficulty.&lt;br /&gt;
&lt;br /&gt;
Unlike Bitcoin, nodes do not know the entire chain - instead they only hold the last 8640 shares (the last 3 day&#039;s worth). In order to prevent an attacker from working on a chain in secret and then releasing it, overriding the existing chain, chains are judged by how much work they have since a point in the past. To ascertain that the work has been done since that point, nodes look at the Bitcoin blocks that the shares reference, establishing a provable timestamp. (If a share points to a block, it was definitely made after that block was made.)&lt;br /&gt;
&lt;br /&gt;
=== Payout logic ===&lt;br /&gt;
&lt;br /&gt;
Each share contains a generation transaction that pays to the previous &#039;&#039;n&#039;&#039; shares, where &#039;&#039;n&#039;&#039; is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.&lt;br /&gt;
&lt;br /&gt;
The block reward (currently 25BTC) and the transaction fees are combined and apportioned according to these rules:&lt;br /&gt;
&lt;br /&gt;
A subsidy of 0.5% is sent to the node that solved the block in order to discourage not sharing solutions that qualify as a block. (A miner with the aim to harm others could withhold the block, thereby preventing anybody from getting paid. He can NOT redirect the payout to himself.) The remaining 99.5% is distributed evenly to miners based on work done recently.&lt;br /&gt;
&lt;br /&gt;
In the event that a share qualifies as a block, this generation transaction is exposed to the Bitcoin network and takes effect, transferring each node its payout.&lt;br /&gt;
&lt;br /&gt;
=== Stales ===&lt;br /&gt;
&lt;br /&gt;
On P2Pool stales refer to shares which can&#039;t make it into the sharechain.  Because the sharechain is 20 times faster than the Bitcoin chain many stales are common and expected. However, because the payout is [[Comparison_of_mining_pools|PPLNS]] only your stale rate relative to other nodes is relevant; the absolute rate is not.&lt;br /&gt;
&lt;br /&gt;
There are two reported kinds of stales in P2Pool: &amp;quot;DEAD ON ARRIVAL&amp;quot; shares and orphan shares. Dead shares were too old by the time they arrived at your local P2Pool. Very high dead rates can indicate miner misconfiguration. Orphan shares are shares which were not extended by the rest of the P2Pool network, because some other miner&#039;s share was accepted first. Very high orphan rates may indicate network connectivity problems. &lt;br /&gt;
&lt;br /&gt;
The P2Pool console output shows your relative stale rate compared to other P2Pool miners in the &#039;Own efficiency&#039; column:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2012-01-07 20:57:51.797420 Pool stales: 13% Own: 13±2% Own efficiency: 100±2%&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you first start P2Pool claimed efficiency will be low and the error bounds on this estimate will be large, but as it runs the numbers will converge to their correct values.&lt;br /&gt;
&lt;br /&gt;
If your efficiency is unusually low, make sure your network connection isn&#039;t overloaded, that your miners support long polling and are not set to work for excessive amounts of time, and that your bitcoind has multiple connections.&lt;br /&gt;
&lt;br /&gt;
== Joining the pool ==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to join the pool:&lt;br /&gt;
&lt;br /&gt;
* Run Bitcoin with the RPC interface enabled: edit bitcoin.conf to include:&lt;br /&gt;
 rpcuser=USER&lt;br /&gt;
 rpcpassword=LONG_RANDOM_SECRET_VALUE&lt;br /&gt;
 server=1&lt;br /&gt;
**&#039;&#039;&#039;Replace LONG_RANDOM_SECRET_VALUE with something long and random like the output of smashing your keyboard for a bit like fju4M78yAj3ds39pak92raK&#039;&#039;&#039;. You don&#039;t need to be able to remember it. If your RPC port becomes exposed to the internet a thief could steal your bitcoin if they could guess it, or use a brute force attack in order to find it.&lt;br /&gt;
** Bitcoin 0.8.5 or later is required&lt;br /&gt;
** It&#039;s important that your Bitcoin client be fully synchronized before starting. It&#039;s also better if you have the Bitcoin port forwarded&lt;br /&gt;
* Download p2pool:&lt;br /&gt;
** Windows binary: See http://forum.bitcoin.org/index.php?topic=18313.0&lt;br /&gt;
** Source download: https://github.com/forrestv/p2pool/tags&lt;br /&gt;
** git: git clone git://github.com/forrestv/p2pool.git&lt;br /&gt;
* Run p2pool: (See below for additional options.)&lt;br /&gt;
** Windows py2exe: run_p2pool.exe&lt;br /&gt;
** Source: python run_p2pool.py&lt;br /&gt;
* Run a miner daemon with long polling connecting to 127.0.0.1 (or the IP of the host running p2pool if it isn&#039;t on the same computer as the miner) on port 9332 with any username and password&lt;br /&gt;
** bfgminer -O u:p -o http://127.0.0.1:9332/ --submit-stale&lt;br /&gt;
* Subscribe to the [https://groups.google.com/forum/#!forum/p2pool-notifications P2Pool notifications] mailing list for urgent pool status updates&lt;br /&gt;
&lt;br /&gt;
Dependencies if running from source:&lt;br /&gt;
* Python 2.6 or higher (but not 3.x)&lt;br /&gt;
* python-argparse&lt;br /&gt;
* Twisted (Ubuntu package python-twisted)&lt;br /&gt;
&lt;br /&gt;
=== Frequently Asked Questions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Why does my miner report so many longpoll events when mining on p2pool? - P4Man&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; &amp;quot;Once every ~30 seconds is normal. That is how often p2pool shares are generated (as opposed to ~10 min for bitcoin blocks) - cabin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;Do the &#039;orphan&#039; and &#039;dead&#039; shares in P2Pool&#039;s status display hurt me?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; They shouldn&#039;t - It&#039;s normal for some fraction of everyone&#039;s shares to end up orphaned or dead. Because payouts are calculated by counting how many shares you have relative to others, everyone with normal configurations is equally &amp;quot;hurt&amp;quot; by this. However, if you have a large proportion of stales, your payout will be hurt. You can see how well you&#039;re doing by looking at P2Pool&#039;s &amp;quot;Efficiency&amp;quot; (ex: &#039;&#039;Efficiency: ~110.6% (40-111%)&#039;&#039;). If 100% doesn&#039;t lie within the [http://en.wikipedia.org/wiki/Confidence_interval confidence interval] at the end, something is probably wrong (with 95% confidence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; &amp;quot;What do I do if my efficiency is low?&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Make sure the computers you&#039;re running P2Pool and the miner on have enough memory and CPU time. If you have a lot of dead shares or the &amp;quot;Local dead on arrival&amp;quot; number is higher than a few percent, that means that something is wrong with your miner. Check to make sure that it is one of the working versions in the &#039;&#039;Miners&#039;&#039; section on this page. Lower the intensity or raise the FPS of your miner. If you have a lot of orphan shares, something is wrong with P2Pool&#039;s P2P connection. Decrease the load on your internet connection or enable QoS (Quality of Service) on your router.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is PPLNS?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Pay-Per-Last-N-Shares is a payout method that is completely resistant to pool hoppers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I not getting very many shares?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The P2Pool difficulty is hundreds of times higher than on other pools. It can take time to get a share. P2Pool displays an estimate of how long you have to wait in the console output.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my miner say it has found a lot of shares but p2pool say I have only found a few?!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The real P2Pool difficulty is hundreds of times higher than on normal pools, but p2pool essentially lies to your miner and tells it to work on relatively easy shares so that it submits shares every few seconds instead of every few hours.  P2Pool then ignores any submitted shares that don&#039;t match the real share difficulty.  By doing this, P2Pool can more accurately report your local hash rate and you can see if you are having problems with too many stale shares quickly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why am I getting so many rejects?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; You&#039;re using an incompatible miner. See the miners section here, increase your FPS on the miner, decrease the intensity, upgrade your miner, or try a different miner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What stops the pool operator or the block finder from stealing a block?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; A block solution is only worth anything because its hash matches Bitcoin&#039;s target. Altering anything within the block will change its hash and make it worthless. If you are concerned about the pool operator stealing a block, you should try to inspect the source code of each new version.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does it say &amp;quot;Generated?&amp;quot; I want to spend my coins now!&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; P2Pool includes payouts in generation transactions, which must mature (taking 120 blocks or 20 hours) before they can be spent. The reason for this is that a block could be orphaned, which would make its payout invalid and could reverse transactions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I get paid transaction fees?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. They are split among P2Pool miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What are these payments I&#039;m getting that aren&#039;t generated?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; These are subsidies that people who support the idea of P2Pool send to miners.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Cool Subsidies sound like an awesome idea! How do I send some BTC to these awesome miners?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; See end of this page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I really need the WHOLE blockchain?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes. Your node needs to be able to independently make decisions about what transactions to mine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; How do merged mining payments work?&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Merged mining is handled entirely by namecoind, so you&#039;re solo mining and payouts will go into namecoind&#039;s wallet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miners ===&lt;br /&gt;
&lt;br /&gt;
This is all for the latest p2pool version, as it includes several new workarounds. &lt;br /&gt;
&lt;br /&gt;
With all miners, using a HIGH FPS target (100?) or a LOW intensity (8 for bfgminer?) helps a lot with reducing stales.&lt;br /&gt;
&lt;br /&gt;
* bfgminer, cgminer, and ufasoft work perfectly without any extra options.&lt;br /&gt;
* DiabloMiner works fine after commit 3b731b9.&lt;br /&gt;
* Phoenix works fine after commit a658ef2.&lt;br /&gt;
* Poclbm works fine after commit 5e994e7.&lt;br /&gt;
&lt;br /&gt;
P2Pool uses higher difficulty shares than most centralized pools, so you&#039;ll see fewer shares reported. This is normal and doesn&#039;t reduce your payments.  It&#039;s also normal to see longpoll messages once per every ten seconds on average.&lt;br /&gt;
&lt;br /&gt;
====Tips to configure bfgminer to reduce stale/doa:====&lt;br /&gt;
* &amp;quot;gpu-threads&amp;quot; : &amp;quot;1&amp;quot;, (2 by default)&lt;br /&gt;
* &amp;quot;queue&amp;quot; : &amp;quot;0&amp;quot;, (1 by default)&lt;br /&gt;
&lt;br /&gt;
Because of fast longpooling in p2pool it is better not NOT fetch work ahead.&lt;br /&gt;
&lt;br /&gt;
On non-dedicated machines intensity=3 allows normal usage of PC, set it to 7 or more to get full hashrate.&lt;br /&gt;
&lt;br /&gt;
On most cards best is diablo and phatk kernel, looks like poclbm kernel have unstable rate.&lt;br /&gt;
&lt;br /&gt;
=== Useful features ===&lt;br /&gt;
&lt;br /&gt;
* If upgrading P2Pool or changing its configuration, you can start another instance of P2Pool in parallel with the first. It will start normally, but realize that the worker and P2P listening ports are busy and keep trying to bind to them in the background. Thus, you can do almost-completely-seamless upgrades of P2Pool.&lt;br /&gt;
* If you run multiple P2Pool nodes or have trusted friends that run P2Pool, you can use &#039;&#039;-n&#039;&#039; to establish a constant extra P2P connection to them.&lt;br /&gt;
* You can make P2Pool use a configuration file by running run_p2pool.py @FILENAME, with FILENAME being the path to a file containing the command-line arguments (newlines are ignored) Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--net bitcoin&lt;br /&gt;
-n 1.2.3.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Setting the username of your miner connecting to P2Pool to a Bitcoin address will make it mine to that address instead of the one requested from bitcoind or set by -a&lt;br /&gt;
* Appending &amp;quot;/1000&amp;quot; to a miner&#039;s username will increase the difficulty of producing a P2Pool share to at most 1000. This is useful to large miners because doing this can make it easier for small miners while minimally impacting the large miners themselves. See [https://bitcointalk.org/index.php?topic=18313.msg816322#msg816322 recommended values].&lt;br /&gt;
** Appending &amp;quot;+1&amp;quot; (for example) after that will make P2Pool always give your miners work with a difficulty of 1&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
Lots of data and useful tools are available at http://127.0.0.1:9332/something:&lt;br /&gt;
* /static/ - Lots of information from shares to graphs to payouts.&lt;br /&gt;
* /rate&lt;br /&gt;
* /users&lt;br /&gt;
* /fee&lt;br /&gt;
* /current_payouts&lt;br /&gt;
* /patron_sendmany - Gives sendmany outputs for fair donations to P2Pool&lt;br /&gt;
* /global_stats&lt;br /&gt;
* /local_stats&lt;br /&gt;
* /peer_addresses&lt;br /&gt;
* /payout_addr&lt;br /&gt;
* /recent_blocks&lt;br /&gt;
* /uptime&lt;br /&gt;
* /web/log - Some different stats collected over the last day&lt;br /&gt;
&lt;br /&gt;
=== Included README ===&lt;br /&gt;
&amp;lt;pre&amp;gt;Requirements:&lt;br /&gt;
    Generic:&lt;br /&gt;
        Bitcoin &amp;gt;=0.6.0rc4 or Bitcoin &amp;gt;=0.5.4 (for BIP16 support) or Litecoin&lt;br /&gt;
        Python&lt;br /&gt;
        Twisted&lt;br /&gt;
        python-argparse (for Python &amp;lt;=2.6)&lt;br /&gt;
    &lt;br /&gt;
    Linux:&lt;br /&gt;
        sudo apt-get install python-zope.interface python-twisted python-twisted-web&lt;br /&gt;
        sudo apt-get install python-argparse # if on Python 2.6 or older&lt;br /&gt;
    &lt;br /&gt;
    Windows:&lt;br /&gt;
        Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
        Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads&lt;br /&gt;
        Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0&lt;br /&gt;
            Unzip the files into C:\Python27\Lib\site-packages&lt;br /&gt;
&lt;br /&gt;
Running P2Pool:&lt;br /&gt;
    To use P2Pool, you must be running your own local bitcoind. For standard&lt;br /&gt;
    configurations, using P2Pool should be as simple as:&lt;br /&gt;
&lt;br /&gt;
        python run_p2pool.py&lt;br /&gt;
&lt;br /&gt;
    Then run your miner program, connecting to 127.0.0.1 on port 9332 with any&lt;br /&gt;
    username and password.&lt;br /&gt;
&lt;br /&gt;
    If you are behind a NAT, you should enable TCP port forwarding on your&lt;br /&gt;
    router. Forward port 9333 to the host running P2Pool.&lt;br /&gt;
&lt;br /&gt;
    Run &amp;quot;python run_p2pool.py --help&amp;quot; for additional options.&lt;br /&gt;
&lt;br /&gt;
Notes for Litecoin:&lt;br /&gt;
    Requirements:&lt;br /&gt;
        In order to run P2Pool with the Litecoin network, you would need to build and install the&lt;br /&gt;
        ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.&lt;br /&gt;
&lt;br /&gt;
        Linux:&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
        Windows:&lt;br /&gt;
            Install MinGW: http://www.mingw.org/wiki/Getting_Started&lt;br /&gt;
            Install Python 2.7: http://www.python.org/getit/&lt;br /&gt;
&lt;br /&gt;
            cd litecoin_scrypt&lt;br /&gt;
            C:\Python27\python.exe setup.py build --compile=mingw32 install&lt;br /&gt;
&lt;br /&gt;
            If you run into an error with unrecognized command line option &#039;-mno-cygwin&#039;, see this:&lt;br /&gt;
                http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o&lt;br /&gt;
    &lt;br /&gt;
    Running P2Pool:&lt;br /&gt;
        Run P2Pool with the &amp;quot;--net litecoin&amp;quot; option.&lt;br /&gt;
        Run your miner program, connecting to 127.0.0.1 on port 9327.&lt;br /&gt;
        Forward port 9338 to the host running P2Pool.&lt;br /&gt;
        &lt;br /&gt;
        Litecoin&#039;s use of ports 9332 and 9332 conflicts with P2Pool running on&lt;br /&gt;
        the Bitcoin network. To avoid problems, add these lines to litecoin.conf&lt;br /&gt;
        and restart litecoind:&lt;br /&gt;
            rpcport=10332&lt;br /&gt;
            port=10333&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option Reference ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage: run_p2pool.py [-h] [--version] [--net {bitcoin,litecoin}] [--testnet]&lt;br /&gt;
                     [--debug] [-a ADDRESS] [--datadir DATADIR]&lt;br /&gt;
                     [--logfile LOGFILE] [--merged MERGED_URLS]&lt;br /&gt;
                     [--give-author DONATION_PERCENTAGE] [--iocp]&lt;br /&gt;
                     [--irc-announce] [--no-bugreport] [--p2pool-port PORT]&lt;br /&gt;
                     [-n ADDR[:PORT]] [--disable-upnp] [--max-conns CONNS]&lt;br /&gt;
                     [-w PORT or ADDR:PORT] [-f FEE_PERCENTAGE]&lt;br /&gt;
                     [--bitcoind-address BITCOIND_ADDRESS]&lt;br /&gt;
                     [--bitcoind-rpc-port BITCOIND_RPC_PORT]&lt;br /&gt;
                     [--bitcoind-p2p-port BITCOIND_P2P_PORT]&lt;br /&gt;
                     [BITCOIND_RPCUSERPASS [BITCOIND_RPCUSERPASS ...]]&lt;br /&gt;
&lt;br /&gt;
p2pool (version 0.11.1-8-ged9359d)&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --version             show program&#039;s version number and exit&lt;br /&gt;
  --net {bitcoin,litecoin}&lt;br /&gt;
                        use specified network (default: bitcoin)&lt;br /&gt;
  --testnet             use the network&#039;s testnet&lt;br /&gt;
  --debug               enable debugging mode&lt;br /&gt;
  -a ADDRESS, --address ADDRESS&lt;br /&gt;
                        generate payouts to this address (default: &amp;lt;address&lt;br /&gt;
                        requested from bitcoind&amp;gt;)&lt;br /&gt;
  --datadir DATADIR     store data in this directory (default: &amp;lt;directory&lt;br /&gt;
                        run_p2pool.py is in&amp;gt;/data)&lt;br /&gt;
  --logfile LOGFILE     log to this file (default: data/&amp;lt;NET&amp;gt;/log)&lt;br /&gt;
  --merged MERGED_URLS  call getauxblock on this url to get work for merged&lt;br /&gt;
                        mining (example:&lt;br /&gt;
                        http://ncuser:ncpass@127.0.0.1:10332/)&lt;br /&gt;
  --give-author DONATION_PERCENTAGE&lt;br /&gt;
                        donate this percentage of work towards the development&lt;br /&gt;
                        of p2pool (default: 0.5)&lt;br /&gt;
  --iocp                use Windows IOCP API in order to avoid errors due to&lt;br /&gt;
                        large number of sockets being open&lt;br /&gt;
  --irc-announce        announce any blocks found on&lt;br /&gt;
                        irc://irc.freenode.net/#p2pool&lt;br /&gt;
  --no-bugreport        disable submitting caught exceptions to the author&lt;br /&gt;
  --disable-upnp        don&#039;t attempt to use UPnP to forward p2pool&#039;s P2P port&lt;br /&gt;
                        from the Internet to this computer&lt;br /&gt;
&lt;br /&gt;
p2pool interface:&lt;br /&gt;
  --p2pool-port PORT    use port PORT to listen for connections (forward this&lt;br /&gt;
                        port from your router!) (default: bitcoin:9333,&lt;br /&gt;
                        litecoin:9338)&lt;br /&gt;
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]&lt;br /&gt;
                        connect to existing p2pool node at ADDR listening on&lt;br /&gt;
                        port PORT (defaults to default p2pool P2P port) in&lt;br /&gt;
                        addition to builtin addresses&lt;br /&gt;
  --max-conns CONNS     maximum incoming connections (default: 40)&lt;br /&gt;
&lt;br /&gt;
worker interface:&lt;br /&gt;
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT&lt;br /&gt;
                        listen on PORT on interface with ADDR for RPC&lt;br /&gt;
                        connections from miners (default: all interfaces,&lt;br /&gt;
                        bitcoin:9332, litecoin:9327)&lt;br /&gt;
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE&lt;br /&gt;
                        charge workers mining to their own bitcoin address (by&lt;br /&gt;
                        setting their miner&#039;s username to a bitcoin address)&lt;br /&gt;
                        this percentage fee to mine on your p2pool instance.&lt;br /&gt;
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee&lt;br /&gt;
                        (default: 0)&lt;br /&gt;
&lt;br /&gt;
bitcoind interface:&lt;br /&gt;
  --bitcoind-address BITCOIND_ADDRESS&lt;br /&gt;
                        connect to this address (default: 127.0.0.1)&lt;br /&gt;
  --bitcoind-rpc-port BITCOIND_RPC_PORT&lt;br /&gt;
                        connect to JSON-RPC interface at this port (default:&lt;br /&gt;
                        bitcoin:8332, litecoin:9332 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  --bitcoind-p2p-port BITCOIND_P2P_PORT&lt;br /&gt;
                        connect to P2P interface at this port (default:&lt;br /&gt;
                        bitcoin:8333, litecoin:9333 &amp;lt;read from bitcoin.conf if&lt;br /&gt;
                        password not provided&amp;gt;)&lt;br /&gt;
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-&lt;br /&gt;
                        separated (only one being provided will cause the&lt;br /&gt;
                        username to default to being empty, and none will&lt;br /&gt;
                        cause P2Pool to read them from bitcoin.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interoperability table ==&lt;br /&gt;
P2pool works fine with most hardware. This lists some of the hardware confirmed to work and any special configuration required.&lt;br /&gt;
&lt;br /&gt;
* ASICminer blade 10GH/s (Requires adding +1 to username or proxy)&lt;br /&gt;
* Avalon 110nm 60-110 GH/s (All batches)&lt;br /&gt;
* Avalon based 55nm 200 GH/s (specific makers?)&lt;br /&gt;
* Avalon prototype 55nm 120GH/s (~ 20 exist)&lt;br /&gt;
* Icarus FPGA&lt;br /&gt;
* Bitfury strikes back H-card and M-card ([https://bitcointalk.org/index.php?topic=18313.msg4424081#msg4424081 instructions])&lt;br /&gt;
* Bitmain Antminer S1 180GH/s ([https://github.com/AntMiner/AntGen1/tree/master/firmware Requires 20131226 firmware.])&lt;br /&gt;
* Bitmain Antminer S3 440GH/s&lt;br /&gt;
* BFL SC Jalapeno, SC Single 30, 50, &amp;amp; 60 GH/s&lt;br /&gt;
* Spondoolies Tech SP 10&lt;br /&gt;
* Spondoolies Tech SP 30&lt;br /&gt;
&lt;br /&gt;
(Various GPU and most FPGAs other than BFL single FPGAs work fine too)&lt;br /&gt;
&lt;br /&gt;
This is a list of hardware with known issues that should not be used on p2pool.&lt;br /&gt;
&lt;br /&gt;
* Cointerra Terraminer IV (10-20% hash rate loss when mining on p2pool)&lt;br /&gt;
* Btimain Antminer S2 (10-20% hash rate loss when mining on p2pool, the S1 &amp;amp; S3 both work well on p2pool)&lt;br /&gt;
&lt;br /&gt;
== Protocol description ==&lt;br /&gt;
&lt;br /&gt;
P2Pool&#039;s protocol mirrors Bitcoin&#039;s P2P protocol in many ways. It uses the same framing (prefix, command, length, checksum, payload) and similar commands:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; - sent to establish a connection - contains (&#039;&#039;version&#039;&#039;, &#039;&#039;services&#039;&#039;, &#039;&#039;addr_to&#039;&#039;, &#039;&#039;addr_from&#039;&#039;, &#039;&#039;nonce&#039;&#039;, &#039;&#039;sub_version&#039;&#039;, &#039;&#039;mode&#039;&#039;, &#039;&#039;best_share_hash&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;setmode&#039;&#039;&#039; - sent to update the &#039;&#039;mode&#039;&#039; sent in the &#039;&#039;&#039;version&#039;&#039;&#039; message - contains (&#039;&#039;mode&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;ping&#039;&#039;&#039; - sent to keep connection alive - contains ()&lt;br /&gt;
* &#039;&#039;&#039;addrme&#039;&#039;&#039; - request that the receiving node send out an addr for the sending node - contains (&#039;&#039;port&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;addrs&#039;&#039;&#039; - broadcast list of nodes&#039; addresses - contains (&#039;&#039;addrs&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getaddrs&#039;&#039;&#039; - request that the receiving node send &#039;&#039;count&#039;&#039; addrs - contains (&#039;&#039;count&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;getshares&#039;&#039;&#039; - request that the receiving node send the shares referenced by &#039;&#039;hashes&#039;&#039; and &#039;&#039;parents&#039;&#039; of their parents, stopping at any share referenced by &#039;&#039;stops&#039;&#039; - contains (&#039;&#039;hashes&#039;&#039;, &#039;&#039;parents&#039;&#039;, &#039;&#039;stops&#039;&#039;)&lt;br /&gt;
* &#039;&#039;&#039;shares&#039;&#039;&#039; - broadcast message of the contents of shares - contains (&#039;&#039;shares&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
This project was announced on June 17, 2011 by Forrest Voight&amp;lt;ref&amp;gt;[https://forum.bitcoin.org/index.php?topic=18313.0 p2pool: Decentralized, DoS-resistant, Hop-Proof - Now active on mainnet!]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The pool began testing against mainnet in mid-July, 2011.  The pool was reviewed on a [[Bitcoin Miner]] post on July 26, 2011&amp;lt;ref&amp;gt;[http://www.bitcoinminer.com/post/8101660461 P2Pool Decentralized Pool Nearly Ready For Prime-Time]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The software author&#039;s address for donations can be found in the signature section of his [http://forum.bitcoin.org/index.php?action=profile;u=6447 forum profile].&lt;br /&gt;
&lt;br /&gt;
==Donating to P2Pool miners==&lt;br /&gt;
In order to encourage people to mine to P2Pool you can donate to the recent miners in proportion using a sendmany:&lt;br /&gt;
&lt;br /&gt;
For example, a bash script to donate 10 btc is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can replace &amp;quot;&amp;quot; with &amp;quot;accountname&amp;quot; if you want to pay from some specific bitcoind account, and you need to replace 127.0.0.1 with the address of your P2Pool node if you&#039;re not running one locally.&lt;br /&gt;
&lt;br /&gt;
Note that the amount you donate will be allocated to recent miners in proportion to the amount of work they&#039;ve done in the last 24 hours or so, but all the miner whose shares of the donated amount are less than 0.01 BTC will have their shares combined into a single amount which is awarded to one of them at random, with the chance of winning this &#039;lottery&#039; weighted by the miner&#039;s recent amount of work done.  You can change this 0.01 BTC threshold like this, for example, which says to pay 10 BTC, but to share it amongst more miners that the default, cutting off at 0.001 BTC instead of at 0.01 BTC.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/src/bitcoin/src/bitcoind sendmany &amp;quot;&amp;quot; &amp;quot;$(GET http://127.0.0.1:9332/patron_sendmany/10/0.001)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you decide to donate you should announce it on the forums so that your donations provide the most incentive possible.&lt;br /&gt;
&lt;br /&gt;
==Sponsors==&lt;br /&gt;
&lt;br /&gt;
Thanks to:&lt;br /&gt;
&lt;br /&gt;
* The [https://bitcoinfoundation.org/ Bitcoin Foundation] for its generous support of P2Pool&lt;br /&gt;
* The [https://litecoin.org/ Litecoin Project] for its generous donations to P2Pool&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Comparison of mining pools]]&lt;br /&gt;
* [[Pooled Mining]]&lt;br /&gt;
* [[P2Pool code documentation]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
* [http://forum.bitcoin.org/index.php?topic=18313.0 P2Pool forum]&lt;br /&gt;
* [https://github.com/forrestv/p2pool p2pool] project on GitHub&lt;br /&gt;
* {{Freenode IRC|p2pool}} discussion and support&lt;br /&gt;
* [http://minefast.coincadence.com/p2pool-stats.php P2Pool Global Stats] stats page&lt;br /&gt;
* Up-to-date P2Pool mining stats: [http://minefast.coincadence.com/p2pool-stats.php Minefast.CoinCadence.com P2Pool stats]&lt;br /&gt;
* [http://poolnode.info poolnode.info] Public list of P2Pool BTC/LTC nodes.&lt;br /&gt;
* [https://www.bitcoinmining.com/bitcoin-mining-pools/ Bitcoin Mining Pools]&lt;br /&gt;
* [http://whatisp2pool.com whatisp2pool.com] An easy introduction to mining and P2Pool.&lt;br /&gt;
* [https://bitcointalk.org/index.php?topic=18313 Bitcointalk thread]&lt;br /&gt;
* [http://organofcorti.blogspot.com/2012/11/52-p2pool-achieving-expectations.html?m=1 Statistical analysis of P2Pool from Neighborhood Pool Watch]&lt;br /&gt;
* [http://chimera.labs.oreilly.com/books/1234000001802/ch08.html#mining_pools P2Pool section] of &amp;lt;i&amp;gt;[[Mastering Bitcoin]]&amp;lt;/i&amp;gt; by [[Wikipedia:Andreas Antonopoulos|Andreas M. Antonopoulos]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pool Operators]]&lt;br /&gt;
{{Pools}}&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61145</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61145"/>
		<updated>2016-06-01T01:56:31Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware,  20160530 released */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160530/ 20160530] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Notice: Only for testing purpose&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61139</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=61139"/>
		<updated>2016-05-30T03:05:34Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* CGMiner Under Ubuntu 14.04, Update CGMiner usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
* Download &amp;amp; Compile&lt;br /&gt;
# git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
# cd cgminer&lt;br /&gt;
# git checkout origin/avalon4 -b avalon4&lt;br /&gt;
# ./autogen.sh --enable-avalon4&lt;br /&gt;
# make -j 4&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
# Run with AUC&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
#;&lt;br /&gt;
# Run with AUC and IIC interface&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
#;or&lt;br /&gt;
#;sudo ./cgminer --avalon4-iic-detect --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./logA&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60917</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60917"/>
		<updated>2016-05-12T01:45:40Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* TODO, Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Upgrade OpenWrt branch to master&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60916</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60916"/>
		<updated>2016-05-12T01:29:09Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Known Issues, Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60915</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60915"/>
		<updated>2016-05-12T01:28:48Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* TODO, Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60914</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60914"/>
		<updated>2016-05-12T01:27:54Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING, Update nexttesting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* Check api fifo overflow&lt;br /&gt;
* Add CODE_HOTBEFORE for hot notify&lt;br /&gt;
* Add a new package AVA4_P_SET_FREQ&lt;br /&gt;
* Support device hardware error&lt;br /&gt;
* Fix duplicate share&lt;br /&gt;
* Move stratum file to a lib&lt;br /&gt;
* Update temp check&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60913</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60913"/>
		<updated>2016-05-12T01:26:24Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware， Update nexttesting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* CGMiner:Add more options to optimize hashrate when toohot occus.&lt;br /&gt;
* CGMiner:Support AV4 miner detect through iic&lt;br /&gt;
* CGMiner:Double check data size when use avalon4_auc_xfer&lt;br /&gt;
* CGMiner:Update adjust_fan to avoid fan overshoot, Thanks to ckolivas&lt;br /&gt;
* CGMiner:Update default target temperature for AvalonMiner 6.(68℃ to 65℃)&lt;br /&gt;
* CGMiner:Support 6 machines maximum on a AUC&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60908</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60908"/>
		<updated>2016-05-11T02:17:47Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Update FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;br /&gt;
3. AUC always appear and then disappear in CGMiner status ?&lt;br /&gt;
  It maybe damaged. Take a new one instead.&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60841</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60841"/>
		<updated>2016-04-28T01:41:27Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Error Codes, Add more codes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IIC ==&lt;br /&gt;
[[File:IIC_Link_Avalon6.png]]&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 65536&lt;br /&gt;
| CODE_LOCK&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run without decrypt&lt;br /&gt;
| Ask service for help&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 131072&lt;br /&gt;
| CODE_HOTBEFORE&lt;br /&gt;
| WARN&lt;br /&gt;
| Toohot is found on MM&lt;br /&gt;
| It&#039;s just a note on toohot&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 262144&lt;br /&gt;
| CODE_APIFIFOOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| API fifo overflow flag&lt;br /&gt;
| It&#039;s just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=60805</id>
		<title>Avalon nano</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=60805"/>
		<updated>2016-04-22T10:41:23Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Hardware version 2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It&#039;s a usb dongle, using only one A3233.&lt;br /&gt;
&lt;br /&gt;
== Hardware version 1.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x1FC9/0x0083&lt;br /&gt;
* Icarus protocol support&lt;br /&gt;
* It use USB CDC, without need driver installation under Linux&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
&lt;br /&gt;
Note:  You may need install driver for windows before usage. Please down it here &amp;lt;ref&amp;gt;http://www.lpcware.com/system/files/lpcopen_examples_windows_usb_drivers_v1_10_0.zip&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support CGMiner, BFGMiner and AvalonMiner(Based on BFGMiner) for now.&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon-usb -b avalon-usb&lt;br /&gt;
 ./autogen.sh --enable-icarus&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
* Patches&lt;br /&gt;
 Patch for Canaan Creative&#039;s CGMiner: [http://downloads.canaan-creative.com/software/avalon_nano/patches/001-avalon3-nano.patch 001-avalon3-nano.patch]&lt;br /&gt;
 For what: CGMiner patch.&lt;br /&gt;
 From where: Based c5ec1171@https://github.com/Canaan-Creative/cgminer/tree/avalon2&lt;br /&gt;
 Comments: &lt;br /&gt;
  	Support avalon3 nano in cgminer.&lt;br /&gt;
  	Support Icarus protocol.&lt;br /&gt;
&lt;br /&gt;
==== BFGMiner ====&lt;br /&gt;
* Run&lt;br /&gt;
  &#039;&#039;&#039;Run under Linux&#039;&#039;&#039;&lt;br /&gt;
  ./bfgminer \&lt;br /&gt;
        -S ICA:/dev/ttyACMx \&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 \&lt;br /&gt;
        --set-device ICA:baud=115200 \&lt;br /&gt;
        --set-device ICA:reopen=timeout \&lt;br /&gt;
        --set-device ICA:work_division=1 \&lt;br /&gt;
        --set-device ICA:fpga_count=1 \&lt;br /&gt;
        --set-device ICA:probe_timeout=100 \&lt;br /&gt;
        --set-device ICA:timing=0.22 \&lt;br /&gt;
        --api-listen \&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Run under Windows&#039;&#039;&#039;&lt;br /&gt;
  bfgminer.exe ^&lt;br /&gt;
        -S ICA:\\.\COMn ^&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 ^&lt;br /&gt;
        --set-device ICA:baud=115200 ^&lt;br /&gt;
        --set-device ICA:reopen=timeout ^&lt;br /&gt;
        --set-device ICA:work_division=1 ^&lt;br /&gt;
        --set-device ICA:fpga_count=1 ^&lt;br /&gt;
        --set-device ICA:probe_timeout=100 ^&lt;br /&gt;
        --set-device ICA:timing=0.22 ^&lt;br /&gt;
        --api-listen ^&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
  &lt;br /&gt;
  Note: See the details about the timing in README. It works ~4GH/s(400 * 11.8) at 400MHz.&lt;br /&gt;
  timing = (1 / (4 * 10 ** 9)) * 10 ** 9 (python format)&lt;br /&gt;
&lt;br /&gt;
* MHS Cur calculation&lt;br /&gt;
  MHS Cur = Diff1 Work * (Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale)) * 60/ Elapsed * 71582788 / 1000000&lt;br /&gt;
  Note：&lt;br /&gt;
  1.if Difficulty Accepted + Difficulty Rejected + Difficulty Stale = 0, then Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale) = 1.&lt;br /&gt;
  2.Get all the infomation through ./bfgminer-rpc -o summary&lt;br /&gt;
&lt;br /&gt;
* BFGMiner release from luck.dashjr&lt;br /&gt;
  http://luke.dashjr.org/programs/bitcoin/files/bfgminer/&lt;br /&gt;
&lt;br /&gt;
==== AvalonMiner ====&lt;br /&gt;
It is developed under Windows with Chinese UI only, You can import the solution and crack it by yourself. It is distributed under UNLICENSE.Source code can be download here: &amp;lt;ref&amp;gt;https://github.com/Canaan-Creative/Avalon-nano/tree/master/gui_1.0&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Release =====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140911/ 20140911]&lt;br /&gt;
* Avalon3 nano windows miner(20140911)&lt;br /&gt;
* Beautifull GUI &lt;br /&gt;
* Auto detect Avalon nano&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140803/ 20140803]&lt;br /&gt;
* Avalon3 nano windows miner(20140803) first version&lt;br /&gt;
* Support bfgminer only&lt;br /&gt;
* Support icarus protocal&lt;br /&gt;
&lt;br /&gt;
===== Run or Debug with CLI =====&lt;br /&gt;
# Copy BfgMiner to a safe place.&lt;br /&gt;
# Uninstall Avalon GUI Miner&lt;br /&gt;
# Modify the icadbg.cmd(under BfgMiner folder) with your correct com port.&lt;br /&gt;
# Double click icadbg.cmd.&lt;br /&gt;
Note: BFGMiner location: (C:\Program Files (x86)\Avalon Nano\BfgMiner)&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
==== Schematics ====&lt;br /&gt;
* [http://downloads.canaan-creative.com/software/avalon_nano/doc/sch/Avalon_usb_sch.pdf Avalon-usb schematics]&lt;br /&gt;
&lt;br /&gt;
==== LPC11U14 Spec ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type || Infomation&lt;br /&gt;
|-&lt;br /&gt;
| Processor || NXP&#039;s Cortex-M0 LPC11U14 microcontroller&lt;br /&gt;
|-&lt;br /&gt;
| Flash || 32 kB&lt;br /&gt;
|-  &lt;br /&gt;
| Data Memory || 6 kB&lt;br /&gt;
|-&lt;br /&gt;
| Clock Crystals || 12.000 MHz crystal for CPU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Clock ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type  ||  Value&lt;br /&gt;
|-&lt;br /&gt;
| LPC11U14 (External)    ||   48.000 MHz &lt;br /&gt;
|-&lt;br /&gt;
| A3233 XCLK (From LPC11U14)  ||   24.000 MHz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== LED ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Color || Memo&lt;br /&gt;
|-&lt;br /&gt;
| Green || Idle status&lt;br /&gt;
|-&lt;br /&gt;
| Red/Blue || Working (Frequency high -&amp;gt; low,led red -&amp;gt; blue)&lt;br /&gt;
|-&lt;br /&gt;
| Red blinking || Overheating&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Programmer ====&lt;br /&gt;
* SmartPro 5000U-Plus&lt;br /&gt;
&lt;br /&gt;
==== SWD Debuger ====&lt;br /&gt;
LPC11U14 only support swd debug.&lt;br /&gt;
The debugger can also be used to program the LPC11U14 chip.&lt;br /&gt;
===== LPCXpresso =====&lt;br /&gt;
* Installation and Activation&lt;br /&gt;
  LPCXpresso download link &amp;lt;ref&amp;gt;https://www.lpcware.com/lpcxpresso/download&amp;lt;/ref&amp;gt;&lt;br /&gt;
  Free Edition is enough. Then activate it. &amp;lt;ref&amp;gt;http://www.lpcware.com/lpcxpresso/activate&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LPC-Link diagnostics&lt;br /&gt;
  Diagnostics when connecting to LPC-Link&lt;br /&gt;
  &lt;br /&gt;
  1.  lpc-link info&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-emu -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  2.  target info &lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-target -pLPC11U14/201 -wire=winusb -4&lt;br /&gt;
  &lt;br /&gt;
  3. burn and run axf file&lt;br /&gt;
  crt_emu_lpc11_13_nxp -pLPC11U14/201 -wire=winusb -flash-load-exec nxp_lpcxpresso_11u14_periph_blinky.axf&lt;br /&gt;
  &lt;br /&gt;
  4. info scan&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-scan -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  5. semi_host debug&lt;br /&gt;
  use newlib semihost&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on OSX)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U14/201 -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
  &lt;br /&gt;
   Then you can use gdb as you want&lt;br /&gt;
&lt;br /&gt;
===== ULINK 2 =====&lt;br /&gt;
* Configure ULINK2 for LPCXpresso&lt;br /&gt;
 1.Change boot mode to CMSIS-DAP&lt;br /&gt;
 Use the [http://www.keil.com/support/man/docs/ulink2/ulink2_boot_mode.htm Boot Mode Utility] to change the mode like this: UL2_Configure B1.&lt;br /&gt;
 &lt;br /&gt;
 2.Set jumper to 3.3V position&lt;br /&gt;
 See [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_jumpers.htm  Jumpers]&lt;br /&gt;
 &lt;br /&gt;
 3.Connect Avalon nano to ULINK2&lt;br /&gt;
 Check [http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections SWD Connector Pinout], need connect SCLK,SWIO,GND only.&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Reflash ====&lt;br /&gt;
* Avalon3 nano firmware burner &amp;lt;ref&amp;gt;http://downloads.canaan-creative.com/software/avalon_nano/burner&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140523/ 20140523]&lt;br /&gt;
* Avalon3 nano firmware(20140523-dd84b993)&lt;br /&gt;
* Support nonce receive timeout check&lt;br /&gt;
* Support adjust freq for 100Mhz to 360Mhz,freq value after reset is 360Mhz&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140519/ 20140519]&lt;br /&gt;
* Avalon3 nano firmware(20140519-8c38877c):first version&lt;br /&gt;
* Avalon3 nano test scripts found here:[https://github.com/BitSyncom/avalon-extras/tree/master/scripts a3233_avalon_usb_testbench.sh]&lt;br /&gt;
* Support adjust freq for 360Mhz to 400Mhz,value after reset is 400Mhz&lt;br /&gt;
* Include avalon3 nano module test(avalon_bsp_testben)&lt;br /&gt;
* bfgminer(0676fa314a9cc1491ad2e5f5c6a5e97f38fa67e3),how to run:http://wiki.0xf8.com/index.php/Bfgminer&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/nexttesting/ NEXT-TESTING]&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Adjust LED color according to the temperature&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
* https://bitcointalk.org/index.php?topic=1022764.0&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
* OpenOCD is not support ULINK2 (See src/jtag/drivers/ulink.c)&lt;br /&gt;
&lt;br /&gt;
== Hardware version 2.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x29F1/0x33F3&lt;br /&gt;
* [https://github.com/Canaan-Creative/MM/blob/avalon4/firmware/doc/protocol.md MM protocol] support&lt;br /&gt;
* It use HID CDC, without need driver installation.&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
* Current：0.018A ~ 0.917A&lt;br /&gt;
* Voltage：4.97V ~ 5.179V&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support Avalon miner, CGMiner for now.&lt;br /&gt;
==== Avalon miner ====&lt;br /&gt;
The easiest way to mining.&lt;br /&gt;
# [https://chrome.google.com/webstore/detail/avalon-miner/odlgkocclgbbahkiajhldmlbmefpcjnc?hl=en-US Install from chrome web store]&lt;br /&gt;
# [http://downloads.canaan-creative.com/software/avalon_nano2/app/Avalon_miner_latest.crx Install from local crx]&lt;br /&gt;
&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon-miner&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass&lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== [https://en.bitcoin.it/wiki/Avalon_nano#Hardware Hardware] ===&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://build.canaan-creative.com:8080/~mikeqin/avalonnano2/ Daily Building]&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano2/firmware/2015-08-25/ 2015-08-25]&lt;br /&gt;
* Avalon nano 2.0 firmware (3U1505-4481b7e0): first version&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
* Baremetal programming&lt;br /&gt;
** http://eleceng.dit.ie/frank/arm/BareMetalLPC1114/index.html&lt;br /&gt;
** http://eewiki.net/display/microcontroller/Getting+Started+with+NXP%27s+LPC11XX+Cortex-M0+ARM+Microcontrollers&lt;br /&gt;
** http://tech.munts.com/MCU/Frameworks/RaspberryPi/expansion/LPC1114/&lt;br /&gt;
* ULINK2&lt;br /&gt;
** [http://www.keil.com/support/docs/3632.htm ULINK: How to downgrade the firmware of ULINK2/ME]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_fw_upgrade.htm Firmware Upgrade Utility]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_trblsh_hwcheck.htm Hardware Checklist]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/uv4/uv4_cl_programflash.htm Program Flash Example]&lt;br /&gt;
* LPC-Link&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/BootingLPCLink?highlight=%28dfu%5C-util%29 Booting LPC-Link]&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics?highlight=%28dfu%5C-util%29 Diagnostics when connecting to LPC-Link]&lt;br /&gt;
* [http://www.keil.com/support/man/docs/dapdebug/dapdebug_introduction.htm About CMSIS-DAP]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/an11321-porting-cmsis-dap-debugger-cortex-m0-platform Porting the CMSIS-DAP debugger to the Cortex-M0 platform]&lt;br /&gt;
* [http://microcontrollershop.com/product_info.php?products_id=4838 LPC11U14 ARM Cortex-M0 Board]&lt;br /&gt;
* [http://www.lpcware.com/content/blog/application-programming-iap-code-example In-Application Programming (IAP) Code Example]&lt;br /&gt;
* Software for flashing / upgrading firmware&lt;br /&gt;
** [http://www.lpcware.com/lpcxpresso/download LPCXpresso] (SWD method)&lt;br /&gt;
* [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm Target Connectors]&lt;br /&gt;
* [https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access Regaining debug access to target MCU]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60669</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60669"/>
		<updated>2016-03-29T01:23:12Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Basic Information, Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
  Hashrate: 3.5Ths ± 5%&lt;br /&gt;
  Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)&lt;br /&gt;
  Overclocking: Support automatically optimizes frequency, no need to overclock manually.&lt;br /&gt;
  PSU ouput pin: 4 x 6PIN PCIe power connector.&lt;br /&gt;
  Controller: Raspberry Pi (version B or B+) Raspberry Pi 2 is not supported yet.&lt;br /&gt;
  AUC: Each AUC can connect up to 6 devices.&lt;br /&gt;
  Dimensions: 340 mm x 136 mm x 150 mm&lt;br /&gt;
  Operating Temperature: -10 °C to 38°C&lt;br /&gt;
  Fan Specs: 12038, Current less then 2.4A&lt;br /&gt;
  Protection Degree: IP20&lt;br /&gt;
  Net weight: 4.8kg&lt;br /&gt;
  Gross weight: 5kg&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60237</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60237"/>
		<updated>2016-01-29T02:47:08Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Firmware, Release 601601-5d8a1270 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2016-01-25/ 2016-01-25] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601601-5d8a1270&#039;&#039;&#039;&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toot&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60236</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60236"/>
		<updated>2016-01-29T02:45:08Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware, Release 20160125 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20160125/ 20160125] ===&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toohot&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60184</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60184"/>
		<updated>2016-01-25T05:17:14Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Basic Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
=== Control board ===&lt;br /&gt;
[[File: AvalonMiner6_CTRL.png | none | 640 px]]&lt;br /&gt;
* NC means not connect&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toohot&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:AvalonMiner6_CTRL.png&amp;diff=60183</id>
		<title>File:AvalonMiner6 CTRL.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:AvalonMiner6_CTRL.png&amp;diff=60183"/>
		<updated>2016-01-25T05:13:50Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60182</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60182"/>
		<updated>2016-01-25T04:27:32Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option (mode 3), and change it to default.&lt;br /&gt;
* Update mm count when scan hash&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toohot&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60181</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60181"/>
		<updated>2016-01-25T04:24:22Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Add mm package header verify&lt;br /&gt;
* Update pll couter for separate module&lt;br /&gt;
* Update iic address free mechanism&lt;br /&gt;
* Update fan rpm detect&lt;br /&gt;
* Fix duplicate address during detect&lt;br /&gt;
* Fix freq setting lost cause by mm was toohot&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60180</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60180"/>
		<updated>2016-01-25T03:53:42Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Remap The NVIC Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60179</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60179"/>
		<updated>2016-01-25T03:50:23Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Remap The NVIC Table, Minor update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:ç | none | 640px ]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60178</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60178"/>
		<updated>2016-01-25T03:45:50Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address&lt;br /&gt;
# AUC may be disappeared by unknown reason, then it can be detected again.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60177</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=60177"/>
		<updated>2016-01-25T03:44:29Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* TODO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
==== Support USB-DFU Mode ====&lt;br /&gt;
 We can use dfu-util under Ubuntu 14.04 or later updata new firmware for AUC2.&lt;br /&gt;
&lt;br /&gt;
==== Using USB-DFU Protocol ====&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Device Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
!Offset!!Field!!Size!!Value!!Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 12h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 01h || DEVICE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bcdUSB || 2 || 0100h || USB specification release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bDeviceClass || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bDeviceSubClass || 1 || 00h || See interface&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bDeviceProtocol || 1 || 00h || See interface.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bMaxPacketSize0 || 1 || 8,16,32,64 || Maximum packet size for endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || idVendor || 2 || ID || Vendor ID. Assigned by the USB-IF.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || idProduct || 2 || ID || Product ID. Assigned by manufacturer.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || bcdDevice || 2 || BCD || Device release number in binary coded decimal.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || iManufacturer || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || iProduct || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || iSerialNumber || 1 || index || index of string descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || bNumConfigurations || 1 || 01h || One configuration only for DFU. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 01h || Runtime protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Functional Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 21h || DFU FUNCTIONAL descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bmAttributes || 1 || Bit mask || DFU attributes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 7……4: reserved&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 3: device will perform a bus detach-attach sequence when it receives a DFU_DETACH request. The host must not issue a USB Reset. (bitWillDetach)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit 2: device is able to communicate via USB afeter Manifestation phase.(bitManifestationTolerant)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no, must see bus reset&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit1: upload capable(bitCanUpload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit0: download capable(bitCanDnload)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 = no&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 = yes&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || wDetachTimeOut || 2 || Number || Time,in milliseconds, that the device will wait after receipt of the DFU_DETACH request. if this time elapses without a USB reaset, then the device will terminate the Reconfiguration phase and revert back to normal operation . This repreents the maximum time that the device can wait(depending on its timers, etc.).The host may specify a shorter timeout in the DFU_DETACH request.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || wTransferSize || 2 || Number || Maximum number of bytes that the device can accept per control-write transaction.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bcdDFUVersion || 2 || BCD || Numeric expression identifying the version of the DFU Specification release.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; height: 100px&amp;quot;&lt;br /&gt;
|+&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;DFU Mode Interface Descriptor&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Offset !! Field !! Size !! Value !! Descripton&lt;br /&gt;
|-&lt;br /&gt;
| 0 || bLength || 1 || 09h || Size of this descriptor,in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || bDescriptorType || 1 || 04h || INTERFACE descriptor type.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || bInterfaceNumber || 1 || Number || Number of this interface.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || bAlternateSetting || 1 || 00h || Alternate setting. Must be zero.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || bNumEndpoints || 1 || 00h || Only the control pipe is used.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || bInterfaceClass || 1 || FEh || Application Specific Class Code.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || bInterfaceSubClass || 1 || 01h || Device Firmware Upgrade Code.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || bInterfaceProtocol || 1 || 02h || DFU mode protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || iInterface || 1 || index || Index of string descriptor for this interface.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== USB-DFU Product&#039;s USB Descriptor ====&lt;br /&gt;
[[File:USB-DFU Descriptor.png]]&lt;br /&gt;
&lt;br /&gt;
==== DFU Updata Process Diagram ====&lt;br /&gt;
[[File:UpdataProcess.png]]&lt;br /&gt;
&lt;br /&gt;
==== Judge Updating Program Or Application Program ====&lt;br /&gt;
 I used a updata flag which is a four bytes word and is writed at fixd flash address (0x8000 - 4)&lt;br /&gt;
&lt;br /&gt;
 The flag&#039;s value is 0xAABBCCDD&lt;br /&gt;
&lt;br /&gt;
 When the bootloader program run, first it judge the updata flag, if the updata falg is not equal 0xAABBCCDD, it will jump to application program.&lt;br /&gt;
 Otherwise it will run to updata program.&lt;br /&gt;
&lt;br /&gt;
==== Jump To Application Program ====&lt;br /&gt;
 When we don&#039;t want to updata application program, the bootloader program should run to application program.&lt;br /&gt;
&lt;br /&gt;
 In order to achieve this goal, we can add under code in your bootloader program.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4000&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4000 is my application program&#039;s MSP point, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov sp, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, =0x4004&amp;quot;);&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;//&amp;quot;the 0x4004 is my application program reset-function entry address, you must change it adapt to your&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;ldr r0, [r0]&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;asm volatile(&amp;quot;mov pc, r0&amp;quot;);&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify dfu-util For Ubuntu 14.04 ====&lt;br /&gt;
 #Inside your home directory, download dfu-util&lt;br /&gt;
&lt;br /&gt;
 git clone git://git.openezx.org/dfu-util.git&lt;br /&gt;
&lt;br /&gt;
 open dfu-util/src/dfu_load.c&lt;br /&gt;
&lt;br /&gt;
 add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&lt;br /&gt;
&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
=== Add DFU In AUC2 Firmware ===&lt;br /&gt;
==== Modify The AUC2 Firmware Flash And RAM Address ====&lt;br /&gt;
 1. We modify the Flash start address at 0x4000, because the bootloader&#039;s size is 0x4000.&amp;lt;br /&amp;gt;&lt;br /&gt;
 2. We modify the RAM start address at 0x10000200, because we remap the NVIC table at the RAM 0x10000000,&lt;br /&gt;
    and the NVIC table size is 0x200 bytes.&amp;lt;br /&amp;gt;&lt;br /&gt;
 3. We modify the *.ld file. And my *.ld file is avalon-usb-converter.ld, you can find your *.ld file.&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;big&amp;gt;Before Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
! &amp;lt;big&amp;gt;After  Modification&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 	/* 32K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000 /* 4K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x0 + 0x8000;&lt;br /&gt;
    __top_RamLoc4 = 0x1000000 + 0x1000;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|MEMORY&lt;br /&gt;
{&lt;br /&gt;
    /* Define each memory region */&lt;br /&gt;
&lt;br /&gt;
    MFlash32 (rx) : ORIGIN = 0x4000, LENGTH = 0x4000 	/* 16K bytes */&lt;br /&gt;
    RamLoc4 (rwx) : ORIGIN = 0x10000200, LENGTH = 0xe00 /* 3.5K bytes */&lt;br /&gt;
    RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2K bytes */&lt;br /&gt;
}&lt;br /&gt;
    /* Define a symbol for the top of each memory region */&lt;br /&gt;
&lt;br /&gt;
    __top_MFlash32 = 0x4000 + 0x4000;&lt;br /&gt;
    __top_RamLoc4 = 0x10000200 + 0xe00;&lt;br /&gt;
    __top_RamUsb2 = 0x20004000 + 0x800;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Remap The NVIC Table ====&lt;br /&gt;
 1. Add Under Function Code In Your Program.&lt;br /&gt;
&lt;br /&gt;
    /* copy the nvic table to ram */&lt;br /&gt;
    static void copy_nvic_to_ram(void)&lt;br /&gt;
    {&lt;br /&gt;
        volatile uint32_t *dst, size;&lt;br /&gt;
        volatile const uint32_t *src;&amp;lt;br /&amp;gt;&lt;br /&gt;
        src = (volatile uint32_t *)APP_START_ADDR;//APP_START_ADDR Is The Application Program&#039;s Start Address. &lt;br /&gt;
        dst = (volatile uint32_t *)RAM_START_ADDR;//RAM_START_ADDR Is The RAM Start Address.&lt;br /&gt;
        size = NVIC_TABLE_LEN &amp;gt;&amp;gt; 2;//NVIC_TABLE_LEN Is The NVIC Table&#039;s Size.&lt;br /&gt;
        do {&lt;br /&gt;
            *dst++ = *src++;&lt;br /&gt;
        } while (--size);&amp;lt;br /&amp;gt;&lt;br /&gt;
        /* NVIC remap to RAM */&lt;br /&gt;
        Chip_SYSCTL_Map(0x01);&amp;lt;br /&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 2. Config The Register To Remap NVIC Table To RAM&lt;br /&gt;
:[[File:LPC11u14 NVIC Table Remap1.png]]&lt;br /&gt;
 &amp;lt;big&amp;gt;&amp;lt;big&amp;gt;More See UM10462 LPC11U3x/2x/1x User manual,At The Page 22.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
&amp;lt;big&amp;gt;1. About Bootloader USB Descriptor:&amp;lt;/big&amp;gt;&lt;br /&gt;
 Note the DFU Functional Descriptor&#039; wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T&#039;s wTransferSize.&lt;br /&gt;
&amp;lt;big&amp;gt;2. About IAP Transmission Data Size &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data size should be 256 or 512 or 1024 or 4096 Bytes.&lt;br /&gt;
&amp;lt;big&amp;gt;3. About IAP Transmission Data Address &amp;lt;/big&amp;gt;&lt;br /&gt;
 The data address should be a 256 byte boundary.&lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata failed ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 Now, I didn&#039;t find the real reason. But, I think the reason is the time of communication is not correct. &lt;br /&gt;
&amp;lt;big&amp;gt;3. Why sometimes updata finished, but the program don&#039;t run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn&#039;t check the flash address and the data address are right.&amp;lt;br /&amp;gt;&lt;br /&gt;
 I will add the check in the program later.&lt;br /&gt;
&lt;br /&gt;
=== References And Links ===&lt;br /&gt;
* [https://www.lpcware.com/lpcxpresso/download LPCXpress IDE Download]&lt;br /&gt;
* [http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf See More About DFU Protocol]&lt;br /&gt;
* [https://github.com/Canaan-Creative/Avalon-USB-converter Source Code]&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
# Commit cgminer package for OpenWrt packages&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Support a new SmartSpeed way&lt;br /&gt;
# Update local hash rate calculate method&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
# Support 5 or 6 mm running stably&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
# Fix duplicate mm address&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59872</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59872"/>
		<updated>2016-01-08T02:20:54Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* LED */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
=== Avalon6 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AUC2 LED ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Initializing or Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red&lt;br /&gt;
| Communication failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
#Support USB-DFU Mode&lt;br /&gt;
#Using USB-DFU Protocol&lt;br /&gt;
##[[DFU Device Descriptor]]&lt;br /&gt;
##[[DFU Interface Descriptor]]&lt;br /&gt;
##[[DFU Functional Descriptor]]&lt;br /&gt;
##[[DFU Mode Interface Descriptor]]&lt;br /&gt;
#[https://en.bitcoin.it/wiki/File:USB-DFU_Descriptor.png Detail USB-DUF Product&#039;s USB Descriptor]&lt;br /&gt;
#[https://en.bitcoin.it/wiki/File:UpdataProcess.png DFU Updata Process Diagram]&lt;br /&gt;
#[[How To Judge The Bootloader Program Is Updating Or Jump To Application Program]]&lt;br /&gt;
#[[How To Jump To Application Program]]&lt;br /&gt;
#Modify dfu-util For Ubuntu 14.04&lt;br /&gt;
     #Inside your home directory, download dfu-util&amp;lt;br /&amp;gt;&lt;br /&gt;
     git clone git://git.openezx.org/dfu-util.git&amp;lt;br /&amp;gt;&lt;br /&gt;
     open dfu-util/src/dfu_load.c&amp;lt;br /&amp;gt;&lt;br /&gt;
     add this instruction &amp;quot;[https://en.bitcoin.it/wiki/File:Milli_sleep%28200%29.png milli_sleep(200);]&amp;quot; under line 134&amp;lt;br /&amp;gt;&lt;br /&gt;
     cd dfu-util&amp;lt;br /&amp;gt;&lt;br /&gt;
     ./autogen.sh&amp;lt;br /&amp;gt;&lt;br /&gt;
     ./configure&amp;lt;br /&amp;gt;&lt;br /&gt;
     make&amp;lt;br /&amp;gt;&lt;br /&gt;
     The resulting binary is dfu-util/src/dfu-util.&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59852</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59852"/>
		<updated>2016-01-07T08:14:02Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Error Codes, Hightlight the EC query entry */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
&#039;&#039;&#039;[http://downloads.canaan-creative.com/querystatus.html &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Query EC here&amp;lt;/span&amp;gt;]&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
=== USB Bootloader ===&lt;br /&gt;
#Support USB-DFU Mode&lt;br /&gt;
#Using USB-DFU Protocol&lt;br /&gt;
##[[DFU Device Descriptor]]&lt;br /&gt;
##[[DFU Interface Descriptor]]&lt;br /&gt;
##[[DFU Functional Descriptor]]&lt;br /&gt;
##[[DFU Mode Interface Descriptor]]&lt;br /&gt;
#[https://en.bitcoin.it/wiki/File:USB-DFU_Descriptor.png Detail USB-DUF Product&#039;s USB Descriptor]&lt;br /&gt;
#[https://en.bitcoin.it/wiki/File:USB-DFU_Descriptor.png DFU Updata Process Diagram]&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59707</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59707"/>
		<updated>2015-12-28T07:06:58Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* NEXT-TESTING， Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Fix duplicate address&lt;br /&gt;
* Update GHS counter to fix the gap between miner and mm&lt;br /&gt;
* Add a new smart speed option&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59706</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59706"/>
		<updated>2015-12-28T07:03:35Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware ， Fix date*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151225] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Support Raspberry Pi 2 B&lt;br /&gt;
* Update SmartSpeed in CGMiner&lt;br /&gt;
* Update Temperature process&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59705</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59705"/>
		<updated>2015-12-28T07:01:04Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* MM Firmware, Release 601512-57532250 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151125] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Support Raspberry Pi 2 B&lt;br /&gt;
* Update SmartSpeed in CGMiner&lt;br /&gt;
* Update Temperature process&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-12-28/ 2015-12-28] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601512-57532250&#039;&#039;&#039;&lt;br /&gt;
* Fix:Don&#039;t touch fan by miner when mm is too hot&lt;br /&gt;
* Fix:Update idle process with toohot detect, stratum detect, and invalid mcu protect&lt;br /&gt;
* Fix:Fix coretest failed cause by incorrect pll setting&lt;br /&gt;
* Update:Update API_TIMEOUT_CONST&lt;br /&gt;
* Add:Support adjust freq by CGMiner when mm is working&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59704</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59704"/>
		<updated>2015-12-28T06:11:47Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* RPi Firmware, Release 20151125*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151225/ 20151125] ===&lt;br /&gt;
* OpenWrt:Update to 15.05&lt;br /&gt;
* OpenWrt:Support Raspberry Pi 2 Model B&lt;br /&gt;
* LuCI:Sync with for-15.05 branch (ab31abd244979d1ff234a15a4a3cf69ac1b73688)&lt;br /&gt;
* CGMiner:Sync with ckolivas&#039;s master (5a456afbfa028162060afd66636b7cb266b35a53)&lt;br /&gt;
* CGMiner:Add more options for smartspeed (Only support MM version &amp;gt;= 601512-xxxxxxxx)&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Support Raspberry Pi 2 B&lt;br /&gt;
* Update SmartSpeed in CGMiner&lt;br /&gt;
* Update Temperature process&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=59670</id>
		<title>Avalon nano</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon_nano&amp;diff=59670"/>
		<updated>2015-12-23T09:19:37Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It&#039;s a usb dongle, using only one A3233.&lt;br /&gt;
&lt;br /&gt;
== Hardware version 1.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x1FC9/0x0083&lt;br /&gt;
* Icarus protocol support&lt;br /&gt;
* It use USB CDC, without need driver installation under Linux&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
&lt;br /&gt;
Note:  You may need install driver for windows before usage. Please down it here &amp;lt;ref&amp;gt;http://www.lpcware.com/system/files/lpcopen_examples_windows_usb_drivers_v1_10_0.zip&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support CGMiner, BFGMiner and AvalonMiner(Based on BFGMiner) for now.&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon-usb -b avalon-usb&lt;br /&gt;
 ./autogen.sh --enable-icarus&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
* Patches&lt;br /&gt;
 Patch for Canaan Creative&#039;s CGMiner: [http://downloads.canaan-creative.com/software/avalon_nano/patches/001-avalon3-nano.patch 001-avalon3-nano.patch]&lt;br /&gt;
 For what: CGMiner patch.&lt;br /&gt;
 From where: Based c5ec1171@https://github.com/Canaan-Creative/cgminer/tree/avalon2&lt;br /&gt;
 Comments: &lt;br /&gt;
  	Support avalon3 nano in cgminer.&lt;br /&gt;
  	Support Icarus protocol.&lt;br /&gt;
&lt;br /&gt;
==== BFGMiner ====&lt;br /&gt;
* Run&lt;br /&gt;
  &#039;&#039;&#039;Run under Linux&#039;&#039;&#039;&lt;br /&gt;
  ./bfgminer \&lt;br /&gt;
        -S ICA:/dev/ttyACMx \&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 \&lt;br /&gt;
        --set-device ICA:baud=115200 \&lt;br /&gt;
        --set-device ICA:reopen=timeout \&lt;br /&gt;
        --set-device ICA:work_division=1 \&lt;br /&gt;
        --set-device ICA:fpga_count=1 \&lt;br /&gt;
        --set-device ICA:probe_timeout=100 \&lt;br /&gt;
        --set-device ICA:timing=0.22 \&lt;br /&gt;
        --api-listen \&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;&#039;Run under Windows&#039;&#039;&#039;&lt;br /&gt;
  bfgminer.exe ^&lt;br /&gt;
        -S ICA:\\.\COMn ^&lt;br /&gt;
        -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 ^&lt;br /&gt;
        --set-device ICA:baud=115200 ^&lt;br /&gt;
        --set-device ICA:reopen=timeout ^&lt;br /&gt;
        --set-device ICA:work_division=1 ^&lt;br /&gt;
        --set-device ICA:fpga_count=1 ^&lt;br /&gt;
        --set-device ICA:probe_timeout=100 ^&lt;br /&gt;
        --set-device ICA:timing=0.22 ^&lt;br /&gt;
        --api-listen ^&lt;br /&gt;
        2&amp;gt;log&lt;br /&gt;
  &lt;br /&gt;
  Note: See the details about the timing in README. It works ~4GH/s(400 * 11.8) at 400MHz.&lt;br /&gt;
  timing = (1 / (4 * 10 ** 9)) * 10 ** 9 (python format)&lt;br /&gt;
&lt;br /&gt;
* MHS Cur calculation&lt;br /&gt;
  MHS Cur = Diff1 Work * (Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale)) * 60/ Elapsed * 71582788 / 1000000&lt;br /&gt;
  Note：&lt;br /&gt;
  1.if Difficulty Accepted + Difficulty Rejected + Difficulty Stale = 0, then Difficulty Accepted / (Difficulty Accepted + Difficulty Rejected + Difficulty Stale) = 1.&lt;br /&gt;
  2.Get all the infomation through ./bfgminer-rpc -o summary&lt;br /&gt;
&lt;br /&gt;
* BFGMiner release from luck.dashjr&lt;br /&gt;
  http://luke.dashjr.org/programs/bitcoin/files/bfgminer/&lt;br /&gt;
&lt;br /&gt;
==== AvalonMiner ====&lt;br /&gt;
It is developed under Windows with Chinese UI only, You can import the solution and crack it by yourself. It is distributed under UNLICENSE.Source code can be download here: &amp;lt;ref&amp;gt;https://github.com/Canaan-Creative/Avalon-nano/tree/master/gui_1.0&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Release =====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140911/ 20140911]&lt;br /&gt;
* Avalon3 nano windows miner(20140911)&lt;br /&gt;
* Beautifull GUI &lt;br /&gt;
* Auto detect Avalon nano&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/software/20140803/ 20140803]&lt;br /&gt;
* Avalon3 nano windows miner(20140803) first version&lt;br /&gt;
* Support bfgminer only&lt;br /&gt;
* Support icarus protocal&lt;br /&gt;
&lt;br /&gt;
===== Run or Debug with CLI =====&lt;br /&gt;
# Copy BfgMiner to a safe place.&lt;br /&gt;
# Uninstall Avalon GUI Miner&lt;br /&gt;
# Modify the icadbg.cmd(under BfgMiner folder) with your correct com port.&lt;br /&gt;
# Double click icadbg.cmd.&lt;br /&gt;
Note: BFGMiner location: (C:\Program Files (x86)\Avalon Nano\BfgMiner)&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
==== Schematics ====&lt;br /&gt;
* [http://downloads.canaan-creative.com/software/avalon_nano/doc/sch/Avalon_usb_sch.pdf Avalon-usb schematics]&lt;br /&gt;
&lt;br /&gt;
==== LPC11U14 Spec ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type || Infomation&lt;br /&gt;
|-&lt;br /&gt;
| Processor || NXP&#039;s Cortex-M0 LPC11U14 microcontroller&lt;br /&gt;
|-&lt;br /&gt;
| Flash || 32 kB&lt;br /&gt;
|-  &lt;br /&gt;
| Data Memory || 6 kB&lt;br /&gt;
|-&lt;br /&gt;
| Clock Crystals || 12.000 MHz crystal for CPU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Clock ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Type  ||  Value&lt;br /&gt;
|-&lt;br /&gt;
| LPC11U14 (External)    ||   48.000 MHz &lt;br /&gt;
|-&lt;br /&gt;
| A3233 XCLK (From LPC11U14)  ||   24.000 MHz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== LED ====&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Color || Memo&lt;br /&gt;
|-&lt;br /&gt;
| Green || Idle status&lt;br /&gt;
|-&lt;br /&gt;
| Red/Blue || Working (Frequency high -&amp;gt; low,led red -&amp;gt; blue)&lt;br /&gt;
|-&lt;br /&gt;
| Red blinking || Overheating&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Programmer ====&lt;br /&gt;
* SmartPro 5000U-Plus&lt;br /&gt;
&lt;br /&gt;
==== SWD Debuger ====&lt;br /&gt;
LPC11U14 only support swd debug.&lt;br /&gt;
The debugger can also be used to program the LPC11U14 chip.&lt;br /&gt;
===== LPCXpresso =====&lt;br /&gt;
* Installation and Activation&lt;br /&gt;
  LPCXpresso download link &amp;lt;ref&amp;gt;https://www.lpcware.com/lpcxpresso/download&amp;lt;/ref&amp;gt;&lt;br /&gt;
  Free Edition is enough. Then activate it. &amp;lt;ref&amp;gt;http://www.lpcware.com/lpcxpresso/activate&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LPC-Link diagnostics&lt;br /&gt;
  Diagnostics when connecting to LPC-Link&lt;br /&gt;
  &lt;br /&gt;
  1.  lpc-link info&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-emu -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  2.  target info &lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-target -pLPC11U14/201 -wire=winusb -4&lt;br /&gt;
  &lt;br /&gt;
  3. burn and run axf file&lt;br /&gt;
  crt_emu_lpc11_13_nxp -pLPC11U14/201 -wire=winusb -flash-load-exec nxp_lpcxpresso_11u14_periph_blinky.axf&lt;br /&gt;
  &lt;br /&gt;
  4. info scan&lt;br /&gt;
  crt_emu_lpc11_13_nxp -info-scan -wire=winusb&lt;br /&gt;
  &lt;br /&gt;
  5. semi_host debug&lt;br /&gt;
  use newlib semihost&lt;br /&gt;
&lt;br /&gt;
* How to debug issues with gdb (Works on OSX)&lt;br /&gt;
    Compile the souce with debug, then run gdb with the following commands:&lt;br /&gt;
    1.arm-none-eabi-gdb avalon_nano.axf&lt;br /&gt;
    2.target extended-remote | crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U14/201 -flash-driver=LPC11_12_13_32K_4K.cfx&lt;br /&gt;
    3.load&lt;br /&gt;
  &lt;br /&gt;
   Then you can use gdb as you want&lt;br /&gt;
&lt;br /&gt;
===== ULINK 2 =====&lt;br /&gt;
* Configure ULINK2 for LPCXpresso&lt;br /&gt;
 1.Change boot mode to CMSIS-DAP&lt;br /&gt;
 Use the [http://www.keil.com/support/man/docs/ulink2/ulink2_boot_mode.htm Boot Mode Utility] to change the mode like this: UL2_Configure B1.&lt;br /&gt;
 &lt;br /&gt;
 2.Set jumper to 3.3V position&lt;br /&gt;
 See [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_jumpers.htm  Jumpers]&lt;br /&gt;
 &lt;br /&gt;
 3.Connect Avalon nano to ULINK2&lt;br /&gt;
 Check [http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections SWD Connector Pinout], need connect SCLK,SWIO,GND only.&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Reflash ====&lt;br /&gt;
* Avalon3 nano firmware burner &amp;lt;ref&amp;gt;http://downloads.canaan-creative.com/software/avalon_nano/burner&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140523/ 20140523]&lt;br /&gt;
* Avalon3 nano firmware(20140523-dd84b993)&lt;br /&gt;
* Support nonce receive timeout check&lt;br /&gt;
* Support adjust freq for 100Mhz to 360Mhz,freq value after reset is 360Mhz&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/20140519/ 20140519]&lt;br /&gt;
* Avalon3 nano firmware(20140519-8c38877c):first version&lt;br /&gt;
* Avalon3 nano test scripts found here:[https://github.com/BitSyncom/avalon-extras/tree/master/scripts a3233_avalon_usb_testbench.sh]&lt;br /&gt;
* Support adjust freq for 360Mhz to 400Mhz,value after reset is 400Mhz&lt;br /&gt;
* Include avalon3 nano module test(avalon_bsp_testben)&lt;br /&gt;
* bfgminer(0676fa314a9cc1491ad2e5f5c6a5e97f38fa67e3),how to run:http://wiki.0xf8.com/index.php/Bfgminer&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano/firmware/nexttesting/ NEXT-TESTING]&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Adjust LED color according to the temperature&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
* https://bitcointalk.org/index.php?topic=1022764.0&lt;br /&gt;
&lt;br /&gt;
=== Issues ===&lt;br /&gt;
* OpenOCD is not support ULINK2 (See src/jtag/drivers/ulink.c)&lt;br /&gt;
&lt;br /&gt;
== Hardware version 2.0 ==&lt;br /&gt;
=== Features ===&lt;br /&gt;
* VID/PID: 0x29F1/0x33F3&lt;br /&gt;
* [https://github.com/Canaan-Creative/MM/blob/avalon4/firmware/doc/protocol.md MM protocol] support&lt;br /&gt;
* It use HID CDC, without need driver installation.&lt;br /&gt;
* Smart [[#LED|LED]] indicator&lt;br /&gt;
* Overheating protection. (&amp;gt;= 65℃)&lt;br /&gt;
* Adjust the hashrate automatically by temperature (~1.0GH/s -  ~3.6GH/s)&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
It can support Avalon miner, CGMiner for now.&lt;br /&gt;
==== Avalon miner ====&lt;br /&gt;
The easiest way to mining.&lt;br /&gt;
# [https://chrome.google.com/webstore/detail/avalon-miner/odlgkocclgbbahkiajhldmlbmefpcjnc?hl=en-US Install from chrome web store]&lt;br /&gt;
# [http://downloads.canaan-creative.com/software/avalon_nano2/app/Avalon_miner_latest.crx Install from local crx]&lt;br /&gt;
&lt;br /&gt;
==== CGMiner Under Ubuntu 14.04 ====&lt;br /&gt;
* Download / Compile / Run&lt;br /&gt;
 &#039;&#039;&#039;Download&#039;&#039;&#039;&lt;br /&gt;
 Inside your home directory, download CGMiner&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Compile&#039;&#039;&#039;&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon-miner&lt;br /&gt;
 make -j 4&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Run&#039;&#039;&#039;&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass&lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer -o http://stratum.pool:3333 -u work -p pass --api-allow W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== [https://en.bitcoin.it/wiki/Avalon_nano#Hardware Hardware] ===&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
==== Release ====&lt;br /&gt;
[http://build.canaan-creative.com:8080/~mikeqin/avalonnano2/ Daily Building]&lt;br /&gt;
&lt;br /&gt;
[http://downloads.canaan-creative.com/software/avalon_nano2/firmware/2015-08-25/ 2015-08-25]&lt;br /&gt;
* Avalon nano 2.0 firmware (3U1505-4481b7e0): first version&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://docs.lpcware.com/usbromlib/v1.0/ USBD ROM Stack]&lt;br /&gt;
* [http://www.nxp.com/documents/user_manual/UM10462.pdf LPC11U1X User Manual]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0 LPCOpen sourcecode]&lt;br /&gt;
* [http://docs.lpcware.com/lpcopen/v1.03/ LPCOpen docs]&lt;br /&gt;
* [http://www.lpcware.com/system/files/LPCXpressoLPC11U14revA_0.pdf LPC11U14 Rev A Schematic]&lt;br /&gt;
* [http://www.nxp.com/documents/errata_sheet/ES_LPC11U1X.pdf Errata sheet LPC11U1x]&lt;br /&gt;
* [http://support.code-red-tech.com/CodeRedWiki/UsingGDB?highlight=%28LPC\-Link%29 Using command line GDB]&lt;br /&gt;
* Baremetal programming&lt;br /&gt;
** http://eleceng.dit.ie/frank/arm/BareMetalLPC1114/index.html&lt;br /&gt;
** http://eewiki.net/display/microcontroller/Getting+Started+with+NXP%27s+LPC11XX+Cortex-M0+ARM+Microcontrollers&lt;br /&gt;
** http://tech.munts.com/MCU/Frameworks/RaspberryPi/expansion/LPC1114/&lt;br /&gt;
* ULINK2&lt;br /&gt;
** [http://www.keil.com/support/docs/3632.htm ULINK: How to downgrade the firmware of ULINK2/ME]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_fw_upgrade.htm Firmware Upgrade Utility]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/ulink2/ulink2_trblsh_hwcheck.htm Hardware Checklist]&lt;br /&gt;
** [http://www.keil.com/support/man/docs/uv4/uv4_cl_programflash.htm Program Flash Example]&lt;br /&gt;
* LPC-Link&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/BootingLPCLink?highlight=%28dfu%5C-util%29 Booting LPC-Link]&lt;br /&gt;
** [http://www.support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics?highlight=%28dfu%5C-util%29 Diagnostics when connecting to LPC-Link]&lt;br /&gt;
* [http://www.keil.com/support/man/docs/dapdebug/dapdebug_introduction.htm About CMSIS-DAP]&lt;br /&gt;
* [http://www.lpcware.com/content/nxpfile/an11321-porting-cmsis-dap-debugger-cortex-m0-platform Porting the CMSIS-DAP debugger to the Cortex-M0 platform]&lt;br /&gt;
* [http://microcontrollershop.com/product_info.php?products_id=4838 LPC11U14 ARM Cortex-M0 Board]&lt;br /&gt;
* [http://www.lpcware.com/content/blog/application-programming-iap-code-example In-Application Programming (IAP) Code Example]&lt;br /&gt;
* Software for flashing / upgrading firmware&lt;br /&gt;
** [http://www.lpcware.com/lpcxpresso/download LPCXpresso] (SWD method)&lt;br /&gt;
* [http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm Target Connectors]&lt;br /&gt;
* [https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access Regaining debug access to target MCU]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:A6_frequency_state.png&amp;diff=59656</id>
		<title>File:A6 frequency state.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:A6_frequency_state.png&amp;diff=59656"/>
		<updated>2015-12-21T04:25:12Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: Mikeqin uploaded a new version of File:A6 frequency state.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59624</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59624"/>
		<updated>2015-12-16T06:22:47Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Frequency Statechart */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Support Raspberry Pi 2 B&lt;br /&gt;
* Update SmartSpeed in CGMiner&lt;br /&gt;
* Update Temperature process&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
  [[File:A6 frequency state.png | none|  640px]]&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:A6_frequency_state.png&amp;diff=59623</id>
		<title>File:A6 frequency state.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:A6_frequency_state.png&amp;diff=59623"/>
		<updated>2015-12-16T06:20:49Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59622</id>
		<title>Avalon6</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Avalon6&amp;diff=59622"/>
		<updated>2015-12-16T06:19:50Z</updated>

		<summary type="html">&lt;p&gt;Mikeqin: /* Controller firmware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basic Information =&lt;br /&gt;
 Hashrate:&lt;br /&gt;
     &#039;&#039;&#039;3.5T (+-5%)&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Power consumption:&lt;br /&gt;
     990W (measure on 12V port of the device)&lt;br /&gt;
     1100W (on the wall, with assumption of 90% power conversion ratio)&lt;br /&gt;
 &lt;br /&gt;
 Power per hash:&lt;br /&gt;
     270J/THash (device only)&lt;br /&gt;
     295J/THash (on the wall, with assumption of 90% power conversion&lt;br /&gt;
 ratio)&lt;br /&gt;
 &lt;br /&gt;
 Overclocking:&lt;br /&gt;
     Support automatically optimize frequency, no need to overclock manually.&lt;br /&gt;
 &lt;br /&gt;
 PSU output pin:&lt;br /&gt;
     4x6PIN PCIe power connector. *All must be connected.*&lt;br /&gt;
 &lt;br /&gt;
 PSU requirements:&lt;br /&gt;
     Minimum 1100W output, recommend to use high-quality PSU for server&lt;br /&gt;
 with more than 1200W output and high quality power cable.&lt;br /&gt;
     Input voltage no lower than 11.7V and no higher than 12.2V (numbers&lt;br /&gt;
 take from the controller)&lt;br /&gt;
     Lower voltage leads to lower hashrate and higher voltage leads to&lt;br /&gt;
 possible device burning down.&lt;br /&gt;
     NOTICE: Poor quality cable may result in low voltage.&lt;br /&gt;
 &lt;br /&gt;
 Fan:&lt;br /&gt;
     Specs: 12038&lt;br /&gt;
     Current: between 1.6A and 2.8A.&lt;br /&gt;
     Minimum RPM: 3800.&lt;br /&gt;
     *NOTICE* If the fan is broken or the fan&#039;s RPM cannot be measure,&lt;br /&gt;
 the device will not start.&lt;br /&gt;
 &lt;br /&gt;
 Controller:&lt;br /&gt;
     Raspberry Pi (version B or B+)&lt;br /&gt;
     Raspberry Pi 2 will be supported at the middle of December 2015&lt;br /&gt;
     Each Rpi can control approximately ~12 devices.&lt;br /&gt;
 &lt;br /&gt;
 AUC:&lt;br /&gt;
     Each AUC can connect up to 6 devices.&lt;br /&gt;
 &lt;br /&gt;
 Dimensions:&lt;br /&gt;
     354x136x150mm&lt;br /&gt;
 &lt;br /&gt;
 Net weight:&lt;br /&gt;
     ~4.8kg&lt;br /&gt;
 &lt;br /&gt;
 Protection Degree:&lt;br /&gt;
     IP20&lt;br /&gt;
&lt;br /&gt;
== LED ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED Status&lt;br /&gt;
! MEMO&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White&lt;br /&gt;
| Power on&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Blue&lt;br /&gt;
| Working normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Yellow blinking&lt;br /&gt;
| Idle normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Green blinking&lt;br /&gt;
| Detect fan and mcu&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| White blinking&lt;br /&gt;
| Turn on LED manually&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Red blinking&lt;br /&gt;
| Toohot/Loopback failed/PG failed/Coretest failed/Voltage error/Temperature sensor error/No fan&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MM Error Codes ==&lt;br /&gt;
[http://downloads.canaan-creative.com/querystatus.html Find error here]&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CODE&lt;br /&gt;
! NAME&lt;br /&gt;
! TYPE&lt;br /&gt;
! MEMO&lt;br /&gt;
! What to do&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| CODE_IDLE&lt;br /&gt;
| WARN&lt;br /&gt;
| Idle&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2&lt;br /&gt;
| CODE_TOOHOT&lt;br /&gt;
| FATAL&lt;br /&gt;
| Too hot&lt;br /&gt;
| Check if the fan is connect successfully&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4&lt;br /&gt;
| CODE_LOOP0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 0 if PG0 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8&lt;br /&gt;
| CODE_LOOP1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 loopback failed&lt;br /&gt;
| Replace a new hash unit  for channel 1 if PG1 is ok&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16&lt;br /&gt;
| CODE_INVALIDMCU&lt;br /&gt;
| FATAL&lt;br /&gt;
| MCU cann&#039;t be detected&lt;br /&gt;
| Replace a new CTRL board&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32&lt;br /&gt;
| CODE_NOSTRATUM&lt;br /&gt;
| WARN&lt;br /&gt;
| No stratum&lt;br /&gt;
| Check if the network is ok or AUC is work  normally&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 64&lt;br /&gt;
| CODE_RBOVERFLOW&lt;br /&gt;
| WARN&lt;br /&gt;
| Nonce ringbuffer overflow&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 128&lt;br /&gt;
| CODE_MMCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
| Find iic rx crc mismatch&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 256&lt;br /&gt;
| CODE_MCUCRCFAILED&lt;br /&gt;
| WARN&lt;br /&gt;
| Find mcu rx irc mismatch&lt;br /&gt;
| Ignore it please, If CGMiner is restart, It will be ok. &lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 512&lt;br /&gt;
| CODE_NOFAN&lt;br /&gt;
| FATAL&lt;br /&gt;
| Fan cann&#039;t be found&lt;br /&gt;
| Check the fan connection&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 1024&lt;br /&gt;
| CODE_PG0FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 0 power good failed&lt;br /&gt;
| Check the PSU for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 2048&lt;br /&gt;
| CODE_PG1FAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Channel 1 power good failed&lt;br /&gt;
| Check the PSU for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 4096&lt;br /&gt;
| CODE_CORETESTFAILED&lt;br /&gt;
| FATAL&lt;br /&gt;
| Find bad chip on channel 0 or channel 1&lt;br /&gt;
| Replace a new hash unit if hash rate is too low, or else you can ignore it.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 8192&lt;br /&gt;
| CODE_ADC0_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 0&lt;br /&gt;
| Replace a new hash unit  for channel 0&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 16384&lt;br /&gt;
| CODE_ADC1_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| Temperature sensor cann&#039;t be detected on channel 1&lt;br /&gt;
| Replace a new hash unit  for channel 1&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| 32768&lt;br /&gt;
| CODE_VOL_ERR&lt;br /&gt;
| FATAL&lt;br /&gt;
| MM is not permit to run at the voltage for safety&lt;br /&gt;
| Change another PSU for the machine&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  &#039;&#039;&#039;WARN&#039;&#039;&#039;-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  &#039;&#039;&#039;FATAL&#039;&#039;&#039;-It designates very severe error events that will presumably lead the Avalon6 to crash.&lt;br /&gt;
&lt;br /&gt;
= Firmware =&lt;br /&gt;
== RPi Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151111/ 20151111] ===&lt;br /&gt;
*CGMiner:Fix divide by zero in Avalon4 driver&lt;br /&gt;
*CGMiner:Add stratum difficulty in pool api&lt;br /&gt;
*CGMiner:Update option for Avalon6&lt;br /&gt;
*CGMiner:Update Vol api display in Avalon4 driver for Avalon6&lt;br /&gt;
*CGMiner:Update fan adjust for Avalon6&lt;br /&gt;
*CGMiner:Update target temp settting for Avalon6&lt;br /&gt;
*LuCI:Update display information for Avalon6&lt;br /&gt;
*LuCI:Update device name for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner configuration for Avalon6&lt;br /&gt;
*LuCI:Update CGMiner setting for Avalon theme&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151031/ 20151031] ===&lt;br /&gt;
* Fix nonce counter for multiple miners&lt;br /&gt;
* Display ASIC counts as TA in CGMiner status&lt;br /&gt;
* Update maximum difficulty for Avalon4 and Avalon6&lt;br /&gt;
* Update temperature check for Avalon6&lt;br /&gt;
* Add GHSmm for hash rate comparison&lt;br /&gt;
* Display PLL information for Avalon6&lt;br /&gt;
* Turn on nonce check as default for Avalon6&lt;br /&gt;
* Correct on voltage decode&lt;br /&gt;
* Enable adjust frequency automatically as default for Avalon6&lt;br /&gt;
* Decode voltage and temperature decode for Avalon6&lt;br /&gt;
* Support err code for Avalon6&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/20151001/ 20151001] ===&lt;br /&gt;
* First version of Avalon6 firmware&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/openwrt/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
* Support Raspberry Pi 2 B&lt;br /&gt;
* Update SmartSpeed in CGMiner&lt;br /&gt;
* Update Temperature process&lt;br /&gt;
&lt;br /&gt;
== MM Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-24/ 2015-11-24] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-f4f59c70&#039;&#039;&#039;&lt;br /&gt;
* Update Core test check rules&lt;br /&gt;
* Update Input voltage check rules (Input voltage should not &amp;gt;= 12.8V)&lt;br /&gt;
* Fix result when run test scripts&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-11-11/ 2015-11-11] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601511-e3d244c0 &#039;&#039;&#039;&lt;br /&gt;
* Add voltage range detect&lt;br /&gt;
* Check maximum rpm when detect fan polar&lt;br /&gt;
* Check temp for bad ntc resistor&lt;br /&gt;
* Check voltage when MM is starting&lt;br /&gt;
* Monitor powergood when power on&lt;br /&gt;
* Update temperature check&lt;br /&gt;
* Update nonce process&lt;br /&gt;
* Update frequency table&lt;br /&gt;
* Fix conflict address&lt;br /&gt;
* Enable 25MHz clock for debug purpose&lt;br /&gt;
* Disable pll when if miner is invalid when process FREQ_WORK&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601510-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* Update IIC and UART communication&lt;br /&gt;
* Support core test by AVA4_P_TEST&lt;br /&gt;
* Update ASIC_FREQMIN to 100MHz&lt;br /&gt;
* Detect ASIC counts by LOOPBACK&lt;br /&gt;
* Fix upgrade failed caused by i2c FIFO overflow&lt;br /&gt;
* Update timer function&lt;br /&gt;
* Use GPIO led as address indicator&lt;br /&gt;
* Always disable the invalid miner when PG or LOOPBACK failed&lt;br /&gt;
* Add PLL status in P_STATUS_M&lt;br /&gt;
* Add err code&lt;br /&gt;
* Support ADC capture&lt;br /&gt;
* Keep free run if MCU can&#039;t be detected&lt;br /&gt;
* Update led status&lt;br /&gt;
* Rewrite boot loader with c code&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/2015-09-30/ 2015-09-30] ===&lt;br /&gt;
* Version &#039;&#039;&#039;601509-a2613610&#039;&#039;&#039;&lt;br /&gt;
* First MM firmware for Avalon6.0 S &lt;br /&gt;
* Support 2 miners&lt;br /&gt;
* Detect asic counts when start&lt;br /&gt;
* Support target filter&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/nexttesting/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
== MCU Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/mm/mcu/2015-10-31/ 2015-10-31] ===&lt;br /&gt;
* Version &#039;&#039;&#039;6C1508-afa837a0&#039;&#039;&#039;&lt;br /&gt;
* For adc and temperature capture use MM protocal&lt;br /&gt;
&lt;br /&gt;
== AUC2 Firmware ==&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/2015-12-08 20151208] ===&lt;br /&gt;
* AUC version: &#039;&#039;&#039;AUC-20151208&#039;&#039;&#039;&lt;br /&gt;
* First release&lt;br /&gt;
&lt;br /&gt;
=== [http://downloads.canaan-creative.com/software/avalon6/auc2/NEXT-TESTING/ NEXT-TESTING] ===&lt;br /&gt;
* NOTICE: Only for testing&lt;br /&gt;
&lt;br /&gt;
= Software Development =&lt;br /&gt;
== Controller firmware ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/avalon6/ Daily building] ===&lt;br /&gt;
=== CGMiner Under Ubuntu 14.04 ===&lt;br /&gt;
 #Inside your home directory, download Cgminer&lt;br /&gt;
 git clone https://github.com/Canaan-Creative/cgminer&lt;br /&gt;
 cd cgminer&lt;br /&gt;
 git checkout origin/avalon4 -b avalon4&lt;br /&gt;
 ./autogen.sh --enable-avalon4&lt;br /&gt;
 make -j 4&lt;br /&gt;
 # Run&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass &lt;br /&gt;
 or&lt;br /&gt;
 sudo ./cgminer --avalon4-freq 200 --avalon4-voltage 7125 -o http://stratum.pool:3333 -u  work -p pass --api-allow W:192.168.2,W:192.168.2.1 --api-listen $@ 2&amp;gt;./log&lt;br /&gt;
&lt;br /&gt;
=== Frequency Statechart ===&lt;br /&gt;
&lt;br /&gt;
== MM ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/mm60/ Daily building] ===&lt;br /&gt;
=== Avalon6 TB2 ===&lt;br /&gt;
 $ make -C firmware PLATFORM=MM60_TB2&lt;br /&gt;
=== Avalon6.0 S ===&lt;br /&gt;
 $ make -C firmware&lt;br /&gt;
&lt;br /&gt;
== AUC2 ==&lt;br /&gt;
=== [http://build.canaan-creative.com:8080/~buildbot/auc2/ Daily building] ===&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
=== OpenWrt ===&lt;br /&gt;
# Support Raspberry Pi 2B&lt;br /&gt;
# Update with the master branch&lt;br /&gt;
# Support Avalon6 in LuCI (Advanced version)&lt;br /&gt;
# Keep more coding on LuCI (Avalon theme)&lt;br /&gt;
&lt;br /&gt;
=== CGMiner ===&lt;br /&gt;
# Add auto speed option&lt;br /&gt;
# Merge the Avalon6 code to CK&#039;s master&lt;br /&gt;
&lt;br /&gt;
=== MM ===&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
# MM can be upgrade by mismatch firmware.&lt;br /&gt;
# local hashrate (GHS av) cann&#039;t match with the pool&#039;s hashrate&lt;br /&gt;
# Use 5 or more modules in one AUC will cause MM idle periodically.&lt;br /&gt;
# Duplicate MM address &lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
  [[File:A6 EC PROC.png | none|  640px]]&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&lt;br /&gt;
  [[File:A6 BOOT.png | none |  640px]]&lt;/div&gt;</summary>
		<author><name>Mikeqin</name></author>
	</entry>
</feed>