cancel
Showing results for 
Search instead for 
Did you mean: 

SM BUS COMMUNICATION WITH STM32F103RBT6

HRedd.1
Associate II

Hello Experts,

Here am using one slave which has SMBUS interface for data transmitting.

I am using STM32F103RBT6 for SM BUS and generating the code with STM CUBE MX ,but am unable generate the working code with it and its generating error code.

I updated the STM32F1 Patch and Cube Mx also still am unable to generate the code.

Does STM32F1 has SMBUS with HAL libraries?

12 REPLIES 12
Imen.D
ST Employee

Hello @HRedd.1​ ,

There is no Driver SMBus for STM32F1.

Can you please share the exact error with your project, this will help me to check the issue.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
HRedd.1
Associate II

thanks for the reply.....

this the code am getting after generation.

static void MX_I2C1_SMBUS_Init(void)

{

 /* USER CODE BEGIN I2C1_Init 0 */

 /* USER CODE END I2C1_Init 0 */

 /* USER CODE BEGIN I2C1_Init 1 */

 /* USER CODE END I2C1_Init 1 */

 /* USER CODE BEGIN I2C1_Init 2 */

 /* USER CODE END I2C1_Init 2 */

}

its not generating the full code..

at present am using cube mx 6.1.1...

Please update me the the version where i can generate full code for SMBUS with STM32F1..

HRedd.1
Associate II

When can I expect ST to solve this issue?

Imen.D
ST Employee

Hi @HRedd.1​ ,

It seems the I2C configuration code under main.c is missed.

Could you please confirm if this issue is reproduced with the latest version of CubeMX (v6.4.0) ?

I'm adding CubeMx expert ​to the loop to check this issue.

Hi @Khouloud ZEMMELI​ ,

Can you please review this issue related to CubeMx tool - depends on the ticket ID 100162 -

(PS: ticket ID 100162, this is an internal tracking number and is not accessible or usable by customers)

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Sara BEN HADJ YAHYA
ST Employee

Hello @Imen DAHMEN​ ,

This issue is not related to CubeMX, it is actually a FW issue, the SMBus driver is not yet available for F1 series.

Could you please report this issue to the FW team ?

Thanks,

Sara.

Thanks @Sara BEN HADJ YAHYA​,

The issue is already escalated to FW team.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

hey can you please confirm if the its 2024 if the support for stm32f103 is been added or not?

Raja_Kaaliraj
Associate III

Yes, the STM32F1 series microcontrollers, including the STM32F103RBT6, do support the SMBus (System Management Bus) interface. However, there are a few things to keep in mind:

  1. HAL Libraries Support: The HAL (Hardware Abstraction Layer) libraries provided by STMicroelectronics include support for SMBus communication protocols. This means you can use HAL functions to configure and communicate over the SMBus interface.

  2. CubeMX Configuration: When using STM32CubeMX to generate code, you need to ensure that you configure the correct peripheral (I2C in this case, since SMBus is based on I2C) and set the appropriate parameters such as clock speed, addressing mode, and other parameters specific to your SMBus communication requirements.

  3. Error Generation: If STM32CubeMX is generating errors when you try to configure the SMBus/I2C peripheral, there could be several reasons:

    • Make sure you have selected the correct STM32F1 series device (STM32F103RBT6) in STM32CubeMX.
    • Ensure that the firmware package and STM32CubeMX version you are using are compatible with the STM32F1 series and the features you intend to use.
  4. Update and Compatibility: You mentioned updating STM32F1 patch and CubeMX, which is good practice. Ensure that the updates are correctly applied and that there are no compatibility issues between the selected device and the tool versions.

To troubleshoot the issue further:

  • Double-check your STM32CubeMX configuration for the I2C (SMBus) peripheral.
  • Look at the error messages specifically to understand what might be causing the code generation to fail.
  • Verify that the clock configuration, GPIO pin assignments, and other settings are correctly configured in STM32CubeMX.

If you provide specific error messages or details about the issues you're encountering during code generation, I can help you troubleshoot further.

Sadly yes im getting error in the code generation of SMBUS peripheral, can you please help me on this & is there a documentation where we have steps to implement this.