cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S105 I2C, STVD does not connect after AFR6 set

andrewandrew9
Associate
Posted on November 18, 2011 at 14:01

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 ?

Thanks

#stm8s-stm8s105-swim-i2c-afr
0 REPLIES 0