cancel
Showing results for 
Search instead for 
Did you mean: 

Setting TIM2_IER or TIM2_CR1 "bricking" STM8S001J3

jlc3
Associate

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...

0 REPLIES 0