Skip to main content
dsjnews
Associate II
December 19, 2017
Solved

Determine CPU Type at Run-time

  • December 19, 2017
  • 3 replies
  • 1382 views
Posted on December 19, 2017 at 20:59

Hi,

I am developing an application that will be targetted at a number of STM32F/STM32L hardware platforms and wondered if it was possible to determine the CPU type at run-time. CPUID is useful to determine ARM core details etc. and thought there would be an equivalent register for the STM stuff.

Regards

FarmerJo

#determine-cpu-type #stm32
    This topic has been closed for replies.
    Best answer by dsjnews
    Posted on December 20, 2017 at 00:12

    Thank you Andrew for that. I even searched the TRM for 'device ID' and must have missed it somehow.

    Anyway this is just what I am looking for.

    Regards

    FarmerJo

    3 replies

    Tesla DeLorean
    Guru
    December 19, 2017
    Posted on December 19, 2017 at 21:04

    Like DEV_ID in DBGMCU_IDCODE?

    Use that to auto-speed F4 parts, ie optimum PLL setting and AHB/APB dividers.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Andrew Neil
    Super User
    December 19, 2017
    Posted on December 19, 2017 at 21:51

    Clive One wrote:

    Like DEV_ID in DBGMCU_IDCODE?

    Should be good - but doesn't always work:

    https://community.st.com/0D50X00009XkbSHSAZ

    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.
    dsjnews
    dsjnewsAuthorBest answer
    Associate II
    December 20, 2017
    Posted on December 20, 2017 at 00:12

    Thank you Andrew for that. I even searched the TRM for 'device ID' and must have missed it somehow.

    Anyway this is just what I am looking for.

    Regards

    FarmerJo