Skip to main content
Visitor II
October 2, 2024
Solved

Distinguish different STM32G0 variants at run-time

  • October 2, 2024
  • 2 replies
  • 839 views

Hi,
Is it possible to distinguish an STM32G0B1KBU6N from an STM32G0B1KBU6 based on the UID?
Is it possible to read this UID in FW in order to recognize whether the correct controller is fitted or is this only possible via the SW interface?

    This topic has been closed for replies.
    Best answer by mƎALLEm

    These part numbers STM32G0B1KBU6N and STM32G0B1KBU6 difference is the N at the end, UID, Flash size and package information don't give this differentiation. 

    SofLit_0-1727878430318.png

    So I don't think it's possible to get that information by software.

     

    2 replies

    Super User
    October 2, 2024

    There's  some register (or ROM location) that tells the package type.

     

    mƎALLEmAnswer
    Technical Moderator
    October 2, 2024

    These part numbers STM32G0B1KBU6N and STM32G0B1KBU6 difference is the N at the end, UID, Flash size and package information don't give this differentiation. 

    SofLit_0-1727878430318.png

    So I don't think it's possible to get that information by software.

     

    Super User
    October 2, 2024

    @TR01 wrote:

    Is it possible to read this UID in FW 


    Yes - see:

    https://community.st.com/t5/stm32-mcus/how-to-obtain-and-use-the-stm32-96-bit-uid/ta-p/621443

     


    @TR01 wrote:

    Is it possible to distinguish an STM32G0B1KBU6N from an STM32G0B1KBU6 based on the UID?


    It doesn't look like it.

    As @Pavel A. said, there may be other ROM locations which may help ...