cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any Real time timer in stm32

Kaushal.Panchal
Associate II

Hello Everyone,

I am using STM32H7 series of microcontroller and in Atmel SAM E70/S70 series of microcontroller they give Real time timer feature,

please refer below datasheet for Atmel Section 28 and page number 229.

https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/SAM-E70S70V70V71-Family-Data-Sheet-DS60001527F.pdf

Real time timer is 32 bit timer And it's works on slow clock (RTC clock).

I want to know is there any feature in STM32H7 series microcontroller. or is any alternate timer like this.

If anybody know then please help me

Thank You,

Kaushal Panchal.

4 REPLIES 4
Danish1
Lead II

There is a Real Time Clock, including alarms and programmable wakeup, which may be driven off external LSE crystal - or other clock sources if you prefer.

This is all documented in the Reference Manual - there's one for each family of stm32h7.

I do wish ST would make the Reference Manual more prominent in their web pages - I know it's big and therefore hard-to-understand, but it contains much vital information and new/potential users need to be pointed towards it.

Hope this helps (or let us know what aspects of SAM's implementation you're not sure how to do on stm32h7),

Danish

Nikita91
Lead II

The ST wording is RTC: Real Time Clock.

Sadly it's not a 32 bits counter but BCD registers with complications to read them synchronously.

There are binary RTC but not in 'H7.

The 'F1 contained v1 RTC which was only one 32-bit binary counter, no calendar.

The v3 RTC can be switched betweeen calendar and binary, but not in all its incarnations, AFAIK only in 'WL and 'U5.

https://community.st.com/s/question/0D53W00000ghPs9SAE/have-you-noticed-the-binary-mode-of-rtc-v3?t=1651229848719

https://community.st.com/s/idea/0873W000000blYLQAY/detail

JW

Danish1
Lead II

You talk about wanting to use a slow clock.

In that case, with all the processing power available in an H7, you could have your own software conversion between raw time-interval and when (in hh:mm:ss.ss) you want an alarm to fire.

And equally it is not difficult to synchronously read the time registers (just read them repeatedly until the non-lsb register does not change between consecutive readings).

Or.

You, certainly in H743, can route LSE clock as the kernel peripheral clock for e.g. lptim2 by programming RCC->D3CCIPR appropriately.

Now LPTIM is just 16 bits. If you really need 32-bits, I don't know if you can cascade them the way I've seen done with other stm32 timers (see block interconnect - it looks possible but I've never tried). Reading cascaded timers needs care but nothing that can't be solved with trivial software.

It is frustrating moving from one manufacturer to another. Each manufacturer makes their own engineering decisions, and users just have to live with them.

Danish