Skip to main content
Sara.T
Associate II
November 10, 2021
Solved

I have a single hex file for STM32F and STM32G series. Can you suggest a way to identify if the microcontroller is a F or G series to load the appropriate code?

  • November 10, 2021
  • 2 replies
  • 1617 views

I went through the device electronic signature. I don't see anything specific by reading the register from which I can differentiate between F and G series

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    DEVID in DBGMCU register

    There are also other ARM registers to determine the model/patch level of the Cortex-M type being used.

    2 replies

    TDK
    November 10, 2021

    I imagine DEV_ID is different between the two, possibly at different memory locations. The reference manual for your specific devices will tell more. "STM32F" isn't too specific and covers a very large number of devices.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Sara.T
    Sara.TAuthor
    Associate II
    November 10, 2021

    Thank you so much. MCU device ID register provides the part number that I was looking for.

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    November 10, 2021

    DEVID in DBGMCU register

    There are also other ARM registers to determine the model/patch level of the Cortex-M type being used.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Sara.T
    Sara.TAuthor
    Associate II
    November 10, 2021

    Thank you so much. It was very helpful.