Actually, you’ve taken the lead on that aspect. I’ve only ever programmed these things via the ST-LINK. When you reported success on RPi programming a while back I assumed (obviously incorrectly) that the bootloader must have a hardcoded UART that it waits for an image to arrive on, but perhaps it monitors them all and uses whichever one starts talking?
If it does get tight you can always reduce those array sizes, they’re pretty arbitrary. I probably went large in the example code because we were running on a device that had heaps of RAM. Assuming a given sampling rate, the array size simply determines the interrupt frequency. If you were to halve their size say, then the interrupts would occur twice as often, but you’d have half as much work to do on each interrupt. If you were to make them ridiculously small then the ISR overhead might start to become a significant part of the load which wouldn’t be good, but I think we’re a long way from that happening.
Yes, exactly right. I think of those CLK and DIO lines as stm’s version of jtag… very low level and let you flash your image pretty much regardless of the current state of the device. Just make sure any image you build/flash also has those pins enabled: Sys->Debug->SerialWire in the panel on the left (see screenshot below). If the two pins are showing up as Green then you’re good to go.
I don’t know whether that’s the case for the serial programming technique you’ve discovered because I’ve never used it.