Avalon nano
Review
Configrations
- LPC11u14
Clock Crystals 48.000 MHz
- A3233
Clock Crystals 24.000 MHz
USB: 29F1:33F1
Schematics
Cgminer for Avalon nano
CGMiner Under Ubuntu 14.04
Download
Inside your home directory, download Cgminer git clone https://github.com/Canaan-Creative/cgminer
Compile
cd cgminer git checkout origin/avalon-usb -b avalon-usb ./autogen.sh --enable-icarus make -j 4
Run
sudo ./cgminer --icarus-options 115200:1:1 --icarus-timing 0.22 -o http://stratum.pool:3333 -u work -p pass or 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,W:192.168.2.1 --api-listen $@ 2>./log
BFGMiner
- Run under Linux
./bfgminer \ -S ICA:/dev/ttyACMx \ -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 \ --set-device ICA:baud=115200 \ --set-device ICA:reopen=timeout \ --set-device ICA:work_division=1 \ --set-device ICA:fpga_count=1 \ --set-device ICA:probe_timeout=100 \ --set-device ICA:timing=0.22 \ --api-listen \ 2>log
- Run under Windows
bfgminer.exe ^ -S ICA:\\.\COMn ^ -o stratum+tcp://stratum.ozco.in:80 -O mikeqin.avalon:1234 ^ --set-device ICA:baud=115200 ^ --set-device ICA:reopen=timeout ^ --set-device ICA:work_division=1 ^ --set-device ICA:fpga_count=1 ^ --set-device ICA:probe_timeout=100 ^ --set-device ICA:timing=0.22 ^ --api-listen ^ 2>log
备注:timing详见bfgminer的README,如果当前配置的频率是400MHz,则Hashrate=400*11.8=~4Gh/s <math>\mbox{timing} = \frac{1}{4\times 10^9}\times 10^9</math>
- BFGMiner MHS Cur
MHS Cur = Diff1 Work * (Difficulty Accepted/(Difficulty Accepted+Difficulty Rejected+Difficulty Stale)*60/(Elapsed)*71582788/(1000000) 所有的信息可以通过./bfgminer-rpc -o summary获取。 注:如果Difficulty Accepted+Difficulty Rejected+Difficulty Stale = 0,则Difficulty Accepted/(Difficulty Accepted+Difficulty Rejected+Difficulty Stale) 取1。
- BFGMiner release from luck.dashjr
http://luke.dashjr.org/programs/bitcoin/files/bfgminer/
LED
Idle:Green. Working:From red to blue( frequency high to low). Hot alert:Red blinking.
ULINK 2
Configure ULINK2 for LPCXpresso
- Change boot mode to CMSIS-DAP
Use the Boot Mode Utility to change the mode like this: UL2_Configure B1.
- Set jumper to 3.3V position
See Jumpers
- Connect Avalon nano to ULINK2
Check SWD Connector Pinout, need connect SCLK,SWIO,GND only.
Miscs
- Keil IDE for avalon3 nano development
- OpenOCD is not support ULINK2 (See src/jtag/drivers/ulink.c)
- Target Connectors
SmartPro 5000U-Plus
- 技术支持联系电话:020-28872449
- Avalon nano离线工程制作
- SmartPRO系列通用编程器软件(SmartPRO 2008)
- SmartPRO 5000U 脱机编程产量控制功能应用笔记
- 编程器FAQ
LPC11u14
LPC11U14 LPCXpresso Board Spec
Processor NXP's Cortex-M0 LPC11U14 microcontroller in LQFP48 package Flash 32 kB Data Memory 6 kB Clock Crystals 12.000 MHz crystal for CPU Dimensions 35 x 140 mm Power 3.15V-3.3V external powering, or from USB via JTAG probe (LPC-LINK) Connectors • mini-B USB connector for LPC11U14 USB interface • All LPC11U14 pins available on expansion connector (2x27 pin rows, 100 mil pitch, 900 mil between rows) Other • Embedded JTAG (LPC-LINK) functionality via LPCXpresso toolchain • LPC-LINK can be connected to external target processor after modifications to the LPCXpresso board • LED on PIO0_7
LPC-Link diagnostics
Diagnostics when connecting to LPC-Link 1. lpc-link info crt_emu_lpc11_13_nxp -info-emu -wire=winusb 2. target info crt_emu_lpc11_13_nxp -info-target -pLPC11U14/201 -wire=winusb -4 3. burn and run axf file crt_emu_lpc11_13_nxp -pLPC11U14/201 -wire=winusb -flash-load-exec nxp_lpcxpresso_11u14_periph_blinky.axf 4. info scan crt_emu_lpc11_13_nxp -info-scan -wire=winusb 5. semi_host debug use newlib semihost
How to debug issues with gdb (Works on OSX)
1.Compile the program with debug options Change Makefile under root directory, set SW_VERSION to DEBUG 2.Recompile the program make clean all 3.Start gdb arm-none-eabi-gdb avalon_nano.axf target extended-remote | crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U14/201 -flash-driver=LPC11_12_13_32K_4K.cfx load Then you can use gdb as you want
Firmware
Reflash
Patches
For what: Cgminer patch. From where: Based c5ec1171@https://github.com/BitSyncom/cgminer/tree/avalon2 Comments: Support avalon3 nano in cgminer. Support Icarus protocol.
20140523
- Avalon3 nano firmware(20140523-dd84b993)
- Support nonce receive timeout check
- Support adjust freq for 100Mhz to 360Mhz,freq value after reset is 360Mhz
20140519
- Avalon3 nano firmware(20140519-8c38877c):first version
- Avalon3 nano test scripts found here:a3233_avalon_usb_testbench.sh
- Support adjust freq for 360Mhz to 400Mhz,value after reset is 400Mhz
- Include avalon3 nano module test(avalon_bsp_testben)
- bfgminer(0676fa314a9cc1491ad2e5f5c6a5e97f38fa67e3),how to run:http://wiki.0xf8.com/index.php/Bfgminer
NEXT-TESTING
- NOTICE: Only for testing
- Adjust LED color according to the temperature
AvalonMiner
Sourcecode
It is developed under Windows with Chinese UI only, You can import the solution and crack it by yourself. It is distributed under UNLICENSE.
20140911
- Avalon3 nano windows miner(20140911)
- Beautifull GUI
- Auto detect Avalon nano
20140803
- Avalon3 nano windows miner(20140803) first version
- Support bfgminer only
- Support icarus protocal
Windows GUI
CLI
- BFGMiner (C:\Program Files (x86)\Avalon Nano\BfgMiner)
1. Copy BfgMiner to a safe place. 2. Uninstall Avalon GUI Miner 3. Modify the icadbg.cmd(under BfgMiner folder) with your correct com port. 4. Double click icadbg.cmd.
Links
- www.nxp.com/documents/user_manual/UM10462.pdf
- LPC11u1x User Manual: 11.4.3 SoftConnect
- LPC11u1x Datasheet : 11.1 Suggested USB interface solutions
- http://www.lpcware.com/content/forum/disconnect-usb-by-software-in-lpc1343
- http://www.lpcware.com/content/forum/softconnect-not-working-sometimes
- http://www.lpcware.com/content/forum/nvicsystemreset-can-not-reset-mcu
- LPCXpresso Active URL
- LPCOpen sourcecode
- LPCOpen docs
- LPC11U14 Rev A Schematic
- Errata sheet LPC11U1x
- Using command line GDB
- Baremetal programming
- ULINK2
- LPC-Link
- About CMSIS-DAP
- Porting the CMSIS-DAP debugger to the Cortex-M0 platform
- LPC11U14 ARM Cortex-M0 Board
- In-Application Programming (IAP) Code Example
- software for flashing / upgrading firmware
- LPCXpresso (SWD method)