Zombieverter programing
>Use this bootloader: https://github.com/jsphuebner/stm32-CANBootloader
GD variant:
Status as of November 20 2021
Early boards fitted with the GigaDevices GD32F107 aka "GD chip" require different firmware routines than STM32F107 equipped boards. See this Zombieverter VCU Support Thread forum post
The GigaDevices `GD32F107 was chosen as an alternative to the ST equivalent due to microchip shortages during the COVID-19 pandemic. A specific branch of firmware code for the GD32F107 variant is found here: https://github.com/damienmaguire/Stm32-vcu/tree/GD_Zombie However development of this variant was abandoned shortly after it's release.
As of this writing , The GD_Zombie branch has fallen behind and substantially diverged from the primary code base. It has been suggested that work needs to be done to make the present firmware chip agnostic via detection routines. See this Zombieverter Development Thread forum post. As of this writing that work has yet to be undertaken and remains to be organized and completed. And issue has be devoted to tracking this progress here: Issue #21
Here is a link to a post with a pre compiled bin and hex for the GD_Zombie created by Damien on the 23/11/21; ZombieVerter VCU Support - Page 9 - openinverter forum This is based on the 16/6/21 code it is not an update. Ensure you rename the binaries to stm32_vcu.xxx to ensure no wifi issues.
UPDATE November 23 2021
Updated information about the necessary edits to make to the STM32 based firmware have been posted in a forum post here. In order to get the firmware to compile and run on the GD32F107 you must make the following changes:
In the file "anain.cpp" @ line 68:
68 - // adc_start_conversion_regular(ADC1); // Comment out for GD MCU
In the file "stm32_can.cpp" @ starting at line 305 modify as follows :
305 - gpio_set_mode(GPIO_BANK_CAN2_RE_RX, GPIO_MODE_INPUT, GPIO_CNF_INPUT_PULL_UPDOWN, GPIO_CAN2_RE_RX);
306 - gpio_set(GPIO_BANK_CAN2_RE_RX, GPIO_CAN2_RE_RX);
307 - // Configure CAN pin: TX.-
308 - gpio_set_mode(GPIO_BANK_CAN2_RE_TX, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_CAN2_RE_TX);
If you properly clone the repository with git on the command line that looks like this;
git clone --recurse-submodules git@github.com:damienmaguire/Stm32-vcu.git
That recursively pulls in copies of libopeninv, etc and tracks them... Hence your file-path should look like
./Stm32-vcu/libopeninv/src/
within the libopeninv src (source) directory you will find anain.cpp and stm32_can.cpp
Make the above changes to these files for the GigaDevices GD32F107.
Software update
As supplied, both the ESP8266 (the wifi plug-in board) and the STM32 (main MPU) are pre-loaded.
The "UART Update" field on the GUI can be given a stm32_vcu.bin file to update the firmware. Note that at this time, loading via Windows 10 is suspect and may lock you out of the board. Ubuntu works best.
Unless you have a specific reason not to, end users should use a released version from: https://github.com/damienmaguire/Stm32-vcu/releases.
By using the ST-Link V2 in-circuit loader, .hex files can be sent to the board to initialize a fresh STM32 MCU, or if it can't be loaded via the bootloader.
Unless you have a specific reason not to, end users should use a released version from: https://github.com/damienmaguire/Stm32-vcu/releases.
The connections needed to use the ST-Link loader are shown below (the red wire provides power to the chip. If the vcu is powered by it’s 12v pins instead, the red wire can be omitted):
Initializing an ISA Shunt
Under Comms in the web interface, there is now an ISAMode option. By default its in "Normal" (Off on Rev 2). If you want to initialize a new shunt, connect it up, power on the shunt and vcu, select "Init" (On on Rev 2), hit save parameters to flash. Power cycle the vcu and shunt at same time (they should be on same 12v feed anyway). The shunt will initialize. Select ISAMode "normal" (Off on Rev 2), save to flash again and reboot again. The shunt should now be up and running. If the shunt doesn't initialise correctly, separate the shunt and VCU supplies and power cycle the VCU two or three seconds after the shunt power is cycled. This has fixed an initialise issue for a number of ISA shunts and possibly requires a VCU code fix that delays the initialising for a few seconds to allow the shunt to power up.