Skip to main content
PZitn.1
Associate
Apr 21, 2022 1:52 PM UTC
Question

Is it possible to programmatically recognize the exact type of MCUs?

STM32L412CBT6P and STM32L412CBT6 processors are used in our boards. We use the same firmware for them. The question is. It is possible to programmatically recognize which of them is mounted on the board. For example, from a unique number? The HAL_GetREVID () and HAL_GetDEVID () functions give the same result for both MCUs.

This topic has been closed for replies.

3 replies

TDK
Apr 21, 2022 3:23 PM UTC

No, it's not.

Depending on the hardware, you may be able to probe the pins in software to determine pullups, grounded pins, etc, to determine what hardware it's running on and infer the chip type.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
Apr 21, 2022 3:43 PM UTC

Try to read out this register:

0693W00000Lye3sQAB.pngIt does not mention the SMPS version of LQFP-48, but AFAIK that was an afterthought and the RM might not have been updated properly.

JW

PZitn.1
PZitn.1Author
Associate
Apr 22, 2022 2:41 PM UTC

Too bad it's not possible. I solved it on your advice. I set the internal pull down to pin PB8. After the reading, I distinguished the circumstances hw as 0 for MCU STM32L412CBT6P and 1 for STM32L412CBT6. Thanks for advice.