I have a Blue Pill set up on breadboard as a minimum system. First of all I had it communicating via USB-TTL to a terminal, but I couldn't get the PWM active. Looking for the various pin statuses was tedious via the terminal, so I set up a D1 mini and added a wireless adaptor to my PC.
For the last couple of days I've been chasing errors on mprot & emcystop. No matter what state I tied PB12 to, the web interface seemed to indicate a floating input. After scratching my head for a while, I went to the source code and found the pin definitions.
#define DIG_IO_BLUEPILL \
DIG_IO_ENTRY(brake_in, GPIOB, GPIO9, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(rev_in, GPIOB, GPIO8, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(fwd_in, GPIOB, GPIO7, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(start_in, GPIOB, GPIO6, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(cruise_in, GPIOB, GPIO5, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(mprot_in, GPIOB, GPIO1, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(emcystop_in, GPIOB, GPIO1, PinMode::INPUT_FLT) \
DIG_IO_ENTRY(bk_in, GPIOB, GPIO12, PinMode::INPUT_PU) \
DIG_IO_ENTRY(bms_in, GPIOD, GPIO15, PinMode::INPUT_FLT) /* non-existant */ \
DIG_IO_ENTRY(ocur_in, GPIOD, GPIO15, PinMode::INPUT_FLT) /* non-existant */ \
DIG_IO_ENTRY(desat_in, GPIOD, GPIO15, PinMode::INPUT_FLT) /* non-existant */ \
DIG_IO_ENTRY(dcsw_out, GPIOC, GPIO15, PinMode::OUTPUT) \
DIG_IO_ENTRY(vtg_out, GPIOD, GPIO14, PinMode::OUTPUT) /* non-existant */ \
DIG_IO_ENTRY(prec_out, GPIOB, GPIO4, PinMode::OUTPUT) \
DIG_IO_ENTRY(led_out, GPIOC, GPIO13, PinMode::OUTPUT) \
DIG_IO_ENTRY(err_out, GPIOD, GPIO14, PinMode::OUTPUT) /* non-existant */ \
DIG_IO_ENTRY(temp0_out, GPIOD, GPIO14, PinMode::OUTPUT) /* non-existant */ \
DIG_IO_ENTRY(speed_out, GPIOD, GPIO14, PinMode::OUTPUT) /* non-existant */ \
DIG_IO_ENTRY(brk_out, GPIOD, GPIO14, PinMode::OUTPUT) /* non-existant */ \
This doesn't match up with Damien's schematic; Both mprot_in and emcystop_in are mapped to PB1 in the definitions, whilst Damien has the MG2 inverter fault line routed to PB12.
Tying PB1 to 3V3 got rid of the errors, which ties up with the definitions, but Damien has PB1 as the uaux (12v supply monitor).
With PB12 now unconnected, I was getting ocur errors, which is confusing since ocur_in is mapped to a non existent port on a Blue Pill. I've yet to delve far enough into the code to find out what bk_in is!