I2C doesn't work on NUCLEO-F410RB with mbed-os 5.15.6

I am using Mbed Studio: 1.4.3 with mbed-os 5.15.6. Used FMPI2C_1 on PA_8 (SCL) and PC_9 (SDA). However it doesn’t work at all. It works on mbed OS2 (online) very well.

Hi if you take a look here mbed-os/targets.json at mbed-os-5.15 · ARMmbed/mbed-os · GitHub and look up the NUCLEO-F410RB you will see that I2C is not in the supported interfaces for this version.

    "device_has_add": [

Hello Anna,

that is not exact. ST usually uses this way of configuration for not standard equipment. So you also need to check what is inherited, in this case FAMILY_STM32.Under that, you will find standard equipment for all ST targets and I2C is part of it.

BR, Jan

Thank you Anna and Jan for replies.

Anna: I agree with Jan. We use many other controllers, one of it is NUCLEO_L053R8. That also shows no I2C, however the I2C works on it without any difficulty. See below copied from the same file.
“device_has_add”: [

There is a difference in between “device_has”: and “device_has_add”:. As Jan rightly mentioned “add” must be representing additional to the original.

The F410RB list also does not have “ANALOGIN”, “PORTIN”, “PORTINOUT” or “PORTOUT”. Do you mean to say the DigitalIN and DigitalOut also will not work?

Still awaiting your response. It is a serious issue.


Hello John,

maybe can be cool to provide more information.
The simple sentence " it doesn’t work at all" is not ideal.

  • how did you find out?
  • did you try also another I2C interface? For example on PB_8 & PB_9 pins.

BR, Jan

Although I had only reported about the two pins which are not working, later I tried other pins as well as you mentioned. It didn’t work. So the fault is not only limited to those two pins or the FMPI2C_1. Tried other I2C also.

And how does it show itself? You still not provide a prove or how to reproduce your issue.

For example, I tried my i2c display and it works, with F446RE.
I do not have F410RB but I have F446RE. It is from same family and that use same HAL drivers = same implementation of I2C only settings will be little bit different, probably.

BR, Jan

Thank you Jan. When you respond, I feel supported.

I too have F446RE and it works without any difficulty.

I used EEPROM for testing on F410RB but it doesn’t even generate a clock on the SCL line nor there is any data on the SDA line which was observed on oscilloscope. Both the lines have proper pullup resistors. It indicates that the hardware is not responding to the instructions. I tried another set of F410RB as well. I think this is a sufficient proof for registering the issue.

Incidentally if I replace the I2C in the EEPROM function with SoftI2C (software I2C) it works smoothly on the same pins without making any change. This is another proof of hardware I2C not working.

I tried FMPI2C_1, I2C_1 and also I2C_2. None of the I2C worked.

I have not yet tried SPI.

UART on the device worked.

Best regards,

Hmm, that is strange.
You can try to downgrade MbedOS version (your → 5.15.0 → 5.14 → and so on) and check if that issue is also in older versions. When you find functional version then you can compare the sources and find the problem.
You can also check Issues · ARMmbed/mbed-os (github.com) whether it has not been reported and if not, you can do it by yourself.

BR, Jan

Many thanks Jan. I am using Mbed Studio. How do I select the OS version for downloading? I am not sure but I think it download only the latest version. Please guide me.

Best Regards,

You are welcome.

Of course I will show you - Managing libraries - Managing libraries | Mbed Studio Documentation
But if you do it this way, it will take a long time (change library and download it, recompile whole project and so on). So, I recommand you to use Online Compiler or KeilStudio online (very much similar to MbedStudio), but it will take much less time. However, this only applies if you will try more than approx two versions of MbedOS.

BR, Jan

Thank you. I have already tried KeilStudio. F410RB has a different problem with KeilStudio. The pin PB_11 is not recognised in the KeilStudio. Have not tried I2C but as PB_11 is not recognised, I can’t make use of it.

Best Regards,


I have a NUCLEO-F410RB board and tried to run I2C example using Mbed Studio.
I used version 5.15.0, 5.15.6 and 5.15.8 of Mbed OS. All version worked fine.


  • NUCLEO-F410RB (update latest firmware V2.J39.M27)
  • I2C EEPROM (Microchip 24LC256) on ci-test-shield


Console output of this test code:

i2cee test
i2cee size: 32768
i2cee read size: 1
i2cee program size: 1
i2cee erase size: 1
Hello World!


1 Like

PB_11 is in the I2C peripheral pin map, I tried compiling via KeilStudio and it seems to be OK.

@MACRUM thank you for your time and the test :slight_smile:

BR, Jan

1 Like

Many thanks Toyo and please forgive me for the delayed reply. It seems as though there might be a fault on mbed.os-5.15.7.

I tried I2C1, PB7 SDA & PB6 SCL which worked fine on mbed.os-5.15.8 on Mbed Studio 1.4.3. I couldn’t check the compiler version but it is ARMC6.

Now the problem with FMPI2C_1 still remains. I used PC9 SDA & PA8 SCL but there is no activity on the bus. Could you please check the FMPI2C_1?

When we create a new project under the Mbed Studio, it still downloads mbed.os-5.15.7. We need to later add mbed.os-5.15.8.

Best Regards,

Thank you Jan. I found the fault. I imported a project from Mbed OS2 (online) into KeilStudio using import utility. Whilst importing it also imported mbed.os from Mbed OS2. Incidentally PB_11 is not supported on mbed.os-2. When I removed the old mbed-os and added mbed.os-5, it worked. The import utility should have ignored mbed.os at the time of importing.

Best Regards,

Toyo, any news on working of FMPI2C_1? I tried all pins for FMPI2C_1 but none of them worked.

Is there any way to create a new project directly with mbed-os 5.15.8 or we have to upgrade it to 5.15.8 after initially creating it with 5.15.7?

With Best Regards,

Hi John,

I tested the FMPI2C_1 port (PC_9 and PA_8) of the F410 RE and unfortunately it doesn’t work. :frowning:
I checked the signals, but proper clock doesn’t come out from the SCL (PA_8). I don’t know the cause of this.

Is there any way to create a new project directly with mbed-os 5.15.8 or we have to upgrade it to 5.15.8 after initially creating it with 5.15.7?

I think the Mbed Studio use template project when creating “empty Mbed OS program” for Mbed OS 5 and the project uses mbed-os version 5.15.7. So, you need to switch to 5.15.8 by manually.