cancel
Showing results for 
Search instead for 
Did you mean: 

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

PZitn.1
Associate II

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.

3 REPLIES 3
TDK
Guru

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".

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
Associate II

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.