I'm trying to make an IoT based project that works on Real-Time data accumulation, for that, I need to know whether the STMF0 series controller are efficient or not.
It all depends on what you mean by "efficient"?
I have not used an STMF0 controller and I was browsing
this Application Note on the RTC. It appears to me to be very efficient and flexible and with many features. I do not, however, see any provision for a battery backup on just the RTC.
The MCP7940 was already mentioned and I would add to that
the DS3231. I have used both of those - building the simple circuit as well as buying very cheap boards. They are convenient and easily used with a battery back up. I should add though, that those RTC chips may lose some accuracy over long periods of time and that could be a consideration. I would speculate that the STM RTC does as well.
If you did not want to add another board and work with I2C, AND it is an IOT project, an alternative that might work is to contact a Time Server on power up (and other times if greater accuracy is needed) and use that accurate time to set/reset the STM RTC. I used that approach recently (
see here). Completely different controller, but you get the idea.
The advantage of the latter approach is that if power does go out, the time is set when it is restored - I also assume that the data logger is not running when the power is off. The disadvantage is that you have to connect to a time server and make sure that error and recover routines are hardened.
Hope this helps.