<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Avalon6</id>
	<title>Avalon6 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Avalon6"/>
	<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Avalon6&amp;action=history"/>
	<updated>2026-05-15T09:44:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://en.zaoniao.it/index.php?title=Avalon6&amp;diff=2912&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;== Basic Information ==   Hashrate: 3.5Ths ± 5%   Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)   Overclocking: Support automatically optim...&quot;</title>
		<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Avalon6&amp;diff=2912&amp;oldid=prev"/>
		<updated>2019-04-04T08:02:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Basic Information ==   Hashrate: 3.5Ths ± 5%   Power Consumption: ≈ 1050 Watt (with assumption of 90% power conversion ratio)   Overclocking: Support automatically optim...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&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;
* 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;
*  RPi firmware 20160125&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;
{| 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'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'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'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'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'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's just a note on api fifo&lt;br /&gt;
|}&lt;br /&gt;
TYPE meaning:&lt;br /&gt;
  '''WARN'''-It designates potentially harmful situations, but you can ignore it.&lt;br /&gt;
  '''FATAL'''-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'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: '''601608-6dffde40'''&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: '''601607-2a78bc90'''&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: '''601605-256e0f00'''&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 '''601601-5d8a1270'''&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 '''601512-57532250'''&lt;br /&gt;
* Fix:Don'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 '''601511-f4f59c70'''&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 '''601511-e3d244c0 '''&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 '''601510-afa837a0'''&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'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 '''601509-a2613610'''&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 '''6C1508-afa837a0'''&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: '''AUC-20151208'''&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;
== 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;
==== 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'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'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'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'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'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'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;
 &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' wTransferSize size, It must equal the USBD_DFU_INIT_PARAM_T'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'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't run normally ?&amp;lt;/big&amp;gt;&lt;br /&gt;
 I think that I didn'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't match with the pool's hashrate&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
1. How to deal with the red blinking machine?&lt;br /&gt;
2. How to boot the machine or hashboard unit safely?&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;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
&lt;br /&gt;
[http://bitcoin.it/ http://bitcoin.it/]&lt;br /&gt;
==See Also on BitcoinWiki==&lt;br /&gt;
* [[BitcoinZAR]]&lt;br /&gt;
* [[Bitcoin Sun]]&lt;br /&gt;
* [[X-BTC (Blog)]]&lt;br /&gt;
* [[Bitcoin Report]]&lt;br /&gt;
* [[Genesis Mining Bitcoin Blog - Breaking Stories &amp;amp; Analysis]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>