Left this as a Youtube comment. I lack skills or funds to contribute, so, just trying to do what I can.
---
This tutorial will show you how to program both of the chips on the Prius Inverter Logic Board, the "STM32" and the "ATmega328p", necessary for getting the inverter board to work, for those who chose to just purchase the populated board. If you purchased the full kit, these will already be programmed.
Timestamps:
1 - Power the board. 12v to the board. Top left (outside) is ground. 6 pins down is the 12+. Red LED should stay lit.
2 - STM32 Programming. Several methods. You're watching a tutorial, so this is the easiest method. Purchase an "ST-Link v2" dongle from eBay, only a few dollars, it usually comes with the jumper wires. The pinout is shown right on the case. You will not use all the wires, only 3 of them. These 3 wires connect to 3 pins on the Prius Logic Board (but not in the same order).
You will use:
"SWCLK" (single wire clock) - To outside pin closest to board edge.
"SWDIO" (single wire data input and output) - To inside pin.
"GND" (ground) - To middle pin.
Then plug the dongle into a USB port on a PC.
3 - ST-Link Software. Link in description. Download and install it.
Click "Target --> Connect" from top menu. You want to see the screen get filled with a data dump of symbols. In the upper right of the screen you can see it identified the device.
In the main viewing window are multiple tabs, click the "Binary File" tab to select it. This will ask to open a file, you choose: "stm32_loader.hex" from OpenInverter.org, download ahead of time. This will change what shows up in the viewing window.
Click "Target --> Program and Verify" from the top menu.
This pops up a window, and you can probably just click "Start" on that window. This programs the STM32 chip with the stm32_loader.hex file.
The STM32 on your Prius Inverter Board can now load other files.
You can close the stm32_loader.hex tab, and go back to the "Binary File" tab, which will ask to open another file. You choose: "stm32_sine.hex" or whatever other OpenInverter.org configuration file makes sense for your project (.hex for motors with encoders, .foc for motors with resolvers, the type of motor you are using determines which of these to pick).
Same as last time, click "Target --> Program and Verify" from the top menu. And click Start.
The STM32 on your Prius Inverter Board now also has the software to run a motor using a sine wave (or FOC) and is set to use that.
A different red LED on the Prius Inverter Board will not be rapidly blinking continuously.
You are now done with the ST-Link USB dongle, it's no longer needed. Future updates can be done via wifi.
4 - Programming the AT-MEGA 328P chip. There are many ways to do this, you are watching a tutorial, so this is the easiest.
You will need to purchase an "Atmel-ICE" device. Plug one end of the ribbon cable it comes with into the "AVR" plug on the device. Plug the other rend of the ribbon cable into the (only) 6-pin header on the Prius Inverter Board, with the tab on the plug facing the outside of the board.
A green led will illuminate on the Atmel ICE device.
(Damien skipped this). Plug the Atmel ICE into a USB port on a PC.
5 - Atmel Studio Software. Link in the description. Download and install it.
Click "Tools --> Device Programming" from top menu.
A window appears, select:
"Tool" - Atmel-ICE
"Device" - ATmega328p
"Interface" - ISP
Click Apply.
Click "Read" below "Device Signature", to initiate communication with the chip. Some numbers and symbols should now appear below the Device Signature.
On the left menubar, select "Fuses". In the pane to the right, under "Fuse Register", change the values to match the following:
EXTENDED: 0x05
HIGH: 0xDE
LOW: 0xFF
Click the "Program" button on the bottom right of this pane to program the chip. A quick progress bar will appear and the chip will program
Just to the right of "Program", click the "Read" button. Then, back up top by the Device Signature, click that "Read" button too. (Why?)
On the left menubar, select "Memories". In the pane to the right, is a "Flash" title, and a file you can choose. You want to choose: "optboot_atmega328.hex" from wherever you installed your Arduino IDE. (We've skipped the step of downloading an Arduino IDE?).
Click the "Program" button right below the Flash and filename.
The ATmega328p chip should now have an Arduino bootloader loaded onto it, which means the Arduino software can now load files onto that chip.
6 - Conclusion. Don't do this, and don't support Damien, he has threatened to make more videos and boards if you do.
----
A couple bits were ambiguous to me, I added some commentary that I hope is correct (I've never done this before, and I don't have one of these boards, and I'm not using a Gen3). Please correct me if I'm wrong.
Next some screencaps of the procedure might be helpful to people, either here or on the wiki.
I'm curious (but don't need to know), what the purpose of the ATmega328p is, and why we flashed it with an arduino bootloader. And what we then do with that in terms of getting a motor spinning or whatnot. Outside the scope of this episode perhaps.