• AVR Freaks

DEVSN0 and DEVSN1... which is most/least significant?

Author
sebmadgwick
Super Member
  • Total Posts : 152
  • Reward points : 0
  • Joined: 2012/07/08 09:56:59
  • Location: 0
  • Status: offline
2018/04/28 11:31:03 (permalink)
0

DEVSN0 and DEVSN1... which is most/least significant?

DEVSN0 and DEVSN1 make up a unique 64-bit serial number for each PIC32MZ but I cannot find documentation describing which is most-significant dword and which is the least-significant dword.
 
Does anyone know the answer?
#1

14 Replies Related Threads

    qɥb
    Monolothic Member
    • Total Posts : 3332
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/28 15:52:26 (permalink)
    5 (1)
    I would assume DEVSN1, but if the point is to have a unique number, why does it matter which is which?
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #2
    sebmadgwick
    Super Member
    • Total Posts : 152
    • Reward points : 0
    • Joined: 2012/07/08 09:56:59
    • Location: 0
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 07:02:24 (permalink)
    0
    I presume that there is a correct order.  There is also a practical concern: I want to use the serial number as that of the final product and the product's serial number must not change after a user firmware update.
    #3
    Jim Nickerson
    User 452
    • Total Posts : 6322
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 07:04:33 (permalink)
    0
    If it were me I would ensure I always used DEVSNx in the same order to make sure the serial number did not change with a software update.
    #4
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 07:11:22 (permalink)
    5 (1)
    qɥb
     if the point is to have a unique number, why does it matter which is which?
     



    indeed, a nice answer :D :D :D

    GENOVA :D :D ! GODO
    #5
    sebmadgwick
    Super Member
    • Total Posts : 152
    • Reward points : 0
    • Joined: 2012/07/08 09:56:59
    • Location: 0
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 07:15:03 (permalink)
    0
    But it may not be me working on the code in the future.  And/or my serial number construction code may be replaced by a function already available with an external library.
     
    If there is a correct order then it would be sensible to use the correct order, rather than speculating if it is absolutely necessary and what measures could I put in place to get away with potentially using the incorrect order.
     
     
    #6
    timijk
    Super Member
    • Total Posts : 1216
    • Reward points : 0
    • Joined: 2007/11/26 00:30:07
    • Location: Taiwan
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 07:51:44 (permalink)
    0
    I saw some examples on github, the consensus is like
    ((uint64_t) DEVSN1 << 32 | (uint64_t) DEVSN0)

     
    I don't know if Harmony has some API for the serial number.
    #7
    aschen0866
    Super Member
    • Total Posts : 4505
    • Reward points : 0
    • Joined: 2006/01/08 22:18:32
    • Location: San Diego
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 08:56:16 (permalink)
    4.5 (2)
    sebmadgwick
    But it may not be me working on the code in the future.  And/or my serial number construction code may be replaced by a function already available with an external library.
    ...
     

    If you are serious about the future, then you shouldn't be using DEVSNx at all because it is a Microchip specific feature. Once you start using these numbers, your future products will be stuck with Microchip PIC32.
    #8
    sebmadgwick
    Super Member
    • Total Posts : 152
    • Reward points : 0
    • Joined: 2012/07/08 09:56:59
    • Location: 0
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 10:19:18 (permalink)
    0
    This is getting a bit off topic.  Microchip provide a 64-bit unique number as two 32-bit words, I am simply asking what the order of these words are.
     
    #9
    NKurzman
    A Guy on the Net
    • Total Posts : 17911
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/29 11:09:08 (permalink)
    5 (1)
    Typically 0 is the low word.
    As the thread pointed out , that is open to Interpretation.
    If you have several boards made at the same time, check the numbers. They should be sequential, or close to it.
    post edited by NKurzman - 2018/04/29 11:51:47
    #10
    Jim Nickerson
    User 452
    • Total Posts : 6322
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: online
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/30 06:21:01 (permalink)
    0
    Maybe asking Microchip Support is the way to get a definitive answer ?
    #11
    sebmadgwick
    Super Member
    • Total Posts : 152
    • Reward points : 0
    • Joined: 2012/07/08 09:56:59
    • Location: 0
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/04/30 11:28:03 (permalink)
    0
    Thanks for the responses.  I have contacted Microchip for a definitive answer.
    #12
    sebmadgwick
    Super Member
    • Total Posts : 152
    • Reward points : 0
    • Joined: 2012/07/08 09:56:59
    • Location: 0
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/10/24 09:59:37 (permalink)
    5 (1)
    Microchip Support responded to say:
    LSW: DEVSN0
    MSW: DEVSN1

    #13
    NorthGuy
    Super Member
    • Total Posts : 5733
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/10/24 10:57:12 (permalink)
    0
    The only property which is guaranteed by the docs is uniqueness. The uniqueness doesn't depend on the word order as long as you always use the same word order.
     
    #14
    crosland
    Super Member
    • Total Posts : 1664
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: DEVSN0 and DEVSN1... which is most/least significant? 2018/10/24 12:55:49 (permalink)
    0
    It only took 6 months?
    #15
    Jump to:
    © 2019 APG vNext Commercial Version 4.5