cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L475 Timestamp

Tech world
Associate II
Posted on March 08, 2018 at 08:20

Hello, 

I'm developing an application based on STM32L475 device. So I need a timestamp on my application. I saw an RTC_timestamp example of NUCLEO-L476RG. So please anyone can tell how can I port this RTC_timestamp example of NUCLEO-L476RG to my STM32L475. 

Best regards.

3 REPLIES 3
Andrew Neil
Evangelist III
Posted on March 08, 2018 at 10:24

What, exactly, do you mean by 'timestamp' ?

If it just needs to be a number that increments at regular intervals, you could just use a simple timer - SysTick ?

how can I port this

same way that you'd port any other code:

  1. Understand the dependencies on the 

    L476RG

  2. See if these are the same on 

    STM32L475 - if they are, job done!

  3. If not, then update to match the 

    STM32L475

Or simply work from scratch - using the RTC can't be that hard, can it ... ?

Tech world
Associate II
Posted on March 08, 2018 at 11:25

thank you, Andrew Neil for the answer.

A timestamp is a record of time and date. 

In my case, I get the sensor values continuously but I need a timestamp.So that I understand my sensors behaviour on a different day, time.

Right now I have my sensor values in this form.0690X00000609vWQAQ.png

But I need a date and time for every corresponding value. I hope now you understand my question. 

Posted on March 08, 2018 at 11:51

Rai Ahmad wrote:

A timestamp is a record of time and date. 

Not necessarily.

I need a timestamp.So that I understand my sensors behaviour on a different day, time.

But you don't need to store the actual calendar date and wall-clock time to do that.

As noted, a simple count that increments at a known, regular interval would be sufficient.

In fact, if your sensor is being sampled 

at a known, regular interval - then you don't need anything extra at all!