Skip to main content
Associate
July 17, 2026
Solved

STM8S105K6 - I2C Busy bit stuck (Solved)

  • July 17, 2026
  • 1 reply
  • 49 views

Hi,

I struggled a while to find out why my STM8S I2C was always “Busy”.

Even AI had some headaches (except only one put me on the track ...)

This device requires to configure the definition of I2C pinout in special FLASH.

To do this, compile your project and open ST Visual Programmer.

Load your “My_project.s19” file. There are three TABS in the window: PROGRAM MEMORY, DATA MEMRORY and OPTION BYTE. Click on option byte, select AFR6 and change it for “I2C SDA SCK” instead of “AIN4 AIN5”. Save your “My_project.s19” file.

When your will burn the device, it will write the new parameters in the FLASH and the device will always be configured for I2C. You do this exercise only once.

Hope it will help ….

Best answer by Maxime_MARCHETTO1

Hello ​@SuperGDx  

Thanks for sharing this case and the solution you found. ​

To make this post more visible and easier to find by others who may face the same issue, I mark my reply as the solution. 

But yes, the solution is on your original post!

Regards,
Maxime

Hi,

I struggled a while to find out why my STM8S I2C was always “Busy”.

Even AI had some headaches (except only one put me on the track ...)

This device requires to configure the definition of I2C pinout in special FLASH.

To do this, compile your project and open ST Visual Programmer.

Load your “My_project.s19” file. There are three TABS in the window: PROGRAM MEMORY, DATA MEMRORY and OPTION BYTE. Click on option byte, select AFR6 and change it for “I2C SDA SCK” instead of “AIN4 AIN5”. Save your “My_project.s19” file.

When your will burn the device, it will write the new parameters in the FLASH and the device will always be configured for I2C. You do this exercise only once.

Hope it will help ….

1 reply

Maxime_MARCHETTO1
ST Community Manager
July 27, 2026

Hello ​@SuperGDx  

Thanks for sharing this case and the solution you found. ​

To make this post more visible and easier to find by others who may face the same issue, I mark my reply as the solution. 

But yes, the solution is on your original post!

Regards,
Maxime

Hi,

I struggled a while to find out why my STM8S I2C was always “Busy”.

Even AI had some headaches (except only one put me on the track ...)

This device requires to configure the definition of I2C pinout in special FLASH.

To do this, compile your project and open ST Visual Programmer.

Load your “My_project.s19” file. There are three TABS in the window: PROGRAM MEMORY, DATA MEMRORY and OPTION BYTE. Click on option byte, select AFR6 and change it for “I2C SDA SCK” instead of “AIN4 AIN5”. Save your “My_project.s19” file.

When your will burn the device, it will write the new parameters in the FLASH and the device will always be configured for I2C. You do this exercise only once.

Hope it will help ….

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.