AnsweredAssumed Answered

STM8S105 I2C, STVD does not connect after AFR6 set

Question asked by keatley.andrew on Nov 18, 2011
I having been having problems getting the I2C to work on an STM8S105K6 in a 32 pin package.

At first I couldn't I couldn't get the start bit to be sent.
Then I realized that I neede to set AFR6 to put I2C onto PB4 and PB5.

I could then send data so this appeared to solve the I2C problem but....

After programming AFR6 with STVD and then switching out of debug mode to make a code change I could no longer connect to the device.

SWIM error [30006] comm init error, chip does not answer.

I tried another board (I shouldn't have), same problem.

This is a real problem as I don't now want to try programming SFR any more as it renders the board unusable.

I think it must be that when I program AFR6 I am also setting something else but AFR6 is the only thing I am changing. I can see nothing else that should cause the problem.

Any Ideas ?