Skip to content

Latest commit

 

History

History
93 lines (65 loc) · 4.39 KB

flashing.md

File metadata and controls

93 lines (65 loc) · 4.39 KB

Flashing

Flashing: atmega32 CPU charger

Flashing tutorial by PascalRZ for the [GTPower A6-10 charger](GTPowerA6-10/Tutorial GTPower A6-10.pdf).

check ISP pins (at least GND and VCC) on your chargers PCB board:

  • G.T. POWER A6-10 200W:
    isp
  • IMAX B6 - original:
    isp
  • IMAX B6 - clone:
    isp

select hex file.

flashing using avrdude

The simplest way to flash a charger is to use avrdude in command line:
(you may want to change -cusbasp according to your programmer. If you use ArduinoISP, set -cstk500v1 -P[COM port] -b19200)

  • try to make a backup:
avrdude.exe -patmega32 -cusbasp -Uflash:r:flash.bin:r -Ulfuse:r:lfuse.bin:r -Uhfuse:r:hfuse.bin:r -Ueeprom:r:eeprom.bin:r -Ulock:r:lock.bin:r -Ucalibration:r:calibration.bin:r
avrdude.exe -patmega32 -cusbasp -Uflash:r:flash.hex:i -Ulfuse:r:lfuse.hex:i -Uhfuse:r:hfuse.hex:i -Ueeprom:r:eeprom.hex:i -Ulock:r:lock.hex:i -Ucalibration:r:calibration.hex:i
  • flash cheali-charger into program memory:
avrdude.exe -patmega32 -cusbasp -Uflash:w:cheali-charger-[VERSION].hex:a

or you can use any other avr programming tool.
WARNING: Don't touch the AVR fuses, setting them wrong may destroy your charger.

Flashing: nuvoton M0517LBN CPU charger

check ISP pins (at least GND and VCC) on your chargers PCB board:
isp

  • Bu-Link:

  • ST-LINK/V2 or STM32F4DISCOVERY board:

  • flashing and debugging M0517LBN with CoIDE: TODO

  • flashing and debugging M0517LBN with OpenOCD: TODO

Differences between versions

Cheali-charger supports three different charger architectures:

  • atmel: atmega32/200W chargers
  • atmel: atmega32/50W chargers
  • nuvoton: M0517/50W chargers

firmware within the same architecture are mostly interchangeable,
(they differ only in the default calibration and sometimes in output power).
WARNING: flashing a firmware with higher output power may destroy your charger.

You can find the latest unstable version here.

firmware name architecture differences
cheali-charger-Dual-Power-B6AC-80W-RC_[version]_atmega32.hex atmega32/50W power 80W, more advanced voltage measurement on first two cells, see 1.
cheali-charger-GTPowerA6-10_[version]_atmega32.hex atmega32/200W
cheali-charger-imaxB6-clone_[version]_atmega32.hex atmega32/50W
cheali-charger-imaxB6-clone_[version]_nuvoton-M0517.hex M0517/50W
cheali-charger-imaxB6-original_[version]_atmega32.hex atmega32/50W
cheali-charger-Turnigy-A-6-10-200W_[version]_atmega32.hex atmega32/200W
cheali-charger-Turnigy-Accucel-6-50W-5A_[version]_atmega32.hex atmega32/50W
cheali-charger-Turnigy-Accucel-8-150W-7A_[version]_atmega32.hex atmega32/200W power 150W, 8-cells, swapped LCD pins
cheali-charger-Turnigy-MEGA-400Wx2_[version]_atmega32.hex atmega32/200W power 400W
  1. atmega32/50W and M0517/50W chargers have a simplified circuit for voltage measurement on first two cells (two op-amps are missing), this is the reason why there is a "expert" calibration. The B6AC-80W-RC is an exception.