Skip to main content
Visitor II
October 17, 2018
Question

Setting TIM2_IER or TIM2_CR1 "bricking" STM8S001J3

  • October 17, 2018
  • 0 replies
  • 575 views

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

    This topic has been closed for replies.