Difference between revisions of "Programming Senoko DVT"
(Created page with "# clone and build https://github.com/xobs/stm32flash # clone and build https://github.com/xobs/senoko-chibios ## go to ./projects/kosagi-senoko and do a make -j4 ## hold down res...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | * clone and build https://github.com/xobs/stm32flash | |
− | + | * clone and build https://github.com/xobs/senoko-chibios | |
− | + | ** go to ./projects/kosagi-senoko and do a make -j4 | |
− | + | * while holding down the "reflash" button on senoko, run ./reset.sh to enter STM32 programming mode over UART | |
− | + | * from the kosagi-senoko directory, run: | |
<path-to>/stm32flash/stm32flash -b 115200 -w build/senoko.hex /dev/ttymxc3 | <path-to>/stm32flash/stm32flash -b 115200 -w build/senoko.hex /dev/ttymxc3 | ||
− | + | * then run | |
./reset.sh | ./reset.sh | ||
− | + | To reset the CPU into run mode | |
+ | * Connect to the serial console of the STM32 gas gauge manager: | ||
screen /dev/ttymxc3 115200 | screen /dev/ttymxc3 115200 | ||
− | + | * from the serial console talking to senoko, run these commands in the "ch>" shell: | |
ch> chg 1000 12600 3000 | ch> chg 1000 12600 3000 | ||
The above command powers up the gas gauge so you can program it (powered up via the charger, the battery pack is in safe mode) | The above command powers up the gas gauge so you can program it (powered up via the charger, the battery pack is in safe mode) | ||
ch> gg setup 3 3000 | ch> gg setup 3 3000 | ||
The above command sets 3 cells and 3000mAh as the capacity for the gas gauge. | The above command sets 3 cells and 3000mAh as the capacity for the gas gauge. |
Latest revision as of 12:33, 25 April 2014
- clone and build https://github.com/xobs/stm32flash
- clone and build https://github.com/xobs/senoko-chibios
- go to ./projects/kosagi-senoko and do a make -j4
- while holding down the "reflash" button on senoko, run ./reset.sh to enter STM32 programming mode over UART
- from the kosagi-senoko directory, run:
<path-to>/stm32flash/stm32flash -b 115200 -w build/senoko.hex /dev/ttymxc3
- then run
./reset.sh
To reset the CPU into run mode
- Connect to the serial console of the STM32 gas gauge manager:
screen /dev/ttymxc3 115200
- from the serial console talking to senoko, run these commands in the "ch>" shell:
ch> chg 1000 12600 3000
The above command powers up the gas gauge so you can program it (powered up via the charger, the battery pack is in safe mode)
ch> gg setup 3 3000
The above command sets 3 cells and 3000mAh as the capacity for the gas gauge.