Skip to main content
Tech world
Associate
March 8, 2018
Question

STM32L475 Timestamp

  • March 8, 2018
  • 3 replies
  • 1069 views
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.

    This topic has been closed for replies.

    3 replies

    Andrew Neil
    Super User
    March 8, 2018
    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 ... ?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Tech world
    Associate
    March 8, 2018
    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. 

    Andrew Neil
    Super User
    March 8, 2018
    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!

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.