2018-10-17 08:35 AM
I've now bricked 3 of these (or at least made them unable to be programmed over SWIM,) and the last one happened after I un-commented these two lines of code:
TIM2_IER = 1; // Enable update interrupts
TIM2_CR1 = 1; // enable timer
This shouldn't do anything with the SWIM pin, right?
It was the only change between the previous, non-bricking flash and this one.
Also, I do have a 5 second delay after startup and clock setup, which was supposed to protect me from this situation, but...