To avoid further delays for testing and using the rev H board could you please do some minor modification
 to the sw, compile up a binary and send it to me? It is the *.bin file from the build directory. 
 I will send some scripts to Aria that will flash the STM on updates (or power on) if a new flash-binary is present.

What needs to be done is:
* Your code seems to have setup TIM3 with PWM? Add PWM to the SV output (around 2 kHz), or program the DAC. 
  
Solution: Put SV in PWM mode AND engage the DAC. So code is independent on jumper position. "SV" command is
          limited to 50% in commands.c. 
Status: DONE!
  

* Add a command to set the SV PWM output.

Solution: Adding support to pass argument on commands. And then "sv 55" will give 55% 
Status: DONE!


* Set the SV output signal to 0 V at power on/reset of the STM to avoid starting the motor.

Solution: Should already be the case if SV is routed from STM32
Status: N/A


* Make the first test LED blink as a heartbeat signal. It is also so that we can visually 
see that the flashing worked. Some delayed toggle on/off in the main loop.

Solution: Rolls LEDs for 10 seconds after power-up/reset. 
Status: DONE!


* The commands must be received on the UART that is connected to UART4 on the CM4 module.

Solution: Not related to STM32 work.  UART4 = Main board STM32, UART5=Expansion Board STM32. 
Status: N/A

* Need to be able to call out to the bootloader, to re-flash firmware over UART.

Solution: Add a command "bootmode". From ST's AN2606 "Introduction to system memory boot mode on STM32 MCUs"
          (https://www.st.com/resource/en/application_note/an2606-introduction-to-system-memory-boot-mode-on-stm32-mcus-stmicroelectronics.pdf),
          we can read "Once initialized, the configuration is 8-bit, even parity, and one stop bit."
          
          $ sudo apt install python3-venv
          $ python3 -m venv stm32-env
          $ source stm32-env/bin/activate
          $ pip install stm32loader pyserial
          $ stm32loader -p /dev/ttyAMA5 -e -w -v -g 0x08000000 Corey-VR-01c_TestFirmware.bin
Status: DONE!



Suggestion (beyond my current scope); 
     Introduce Full Position control in the STM32 instead of the CM4. I added a pid.c/.h for PID control
     speed. Possibly a cascaded PID setup, where PID1 controls the SV+FR value (MV=normalized HU/HV/HW value(
     and PID2 controls the location (also "clever" normalization for circular movements).
     Setting up PID control without the machine is fairly time consuming, and not something I will take on. 
     Commands should be simple;
        "home"            // move to "Home" position
        "compartment 5"   // move to compartment 5


        