cancel
Showing results for 
Search instead for 
Did you mean: 

How can be detected by software if running on a STM32H753 or a STM32H743 device ? We did not find a processor internal identification to differ between the two types.

aschu.1
Associate
 
1 ACCEPTED SOLUTION

Accepted Solutions
aschu.1
Associate

Hello

thanks all for your answers.

The problem was solved by enabling the clock of the crypto unit and reading the status register.

In case of 75X device the status register is 0x0000 0003. In case of 74X device it is 0x0000 0000.

Here an example code:

uint32_t u32_DEVID;

 RCC->AHB2ENR |= 0x00000010; // Set CRYPTEN in AHB2ENR Register

  u32_DEVID = *((uint32_t*)(0x48021004)); // Read CRYP_SR @ address 0x48011004

  if (u32_DEVID == 0x00000003)

 {

       // CRYP present

       // STM32H75x

 }

 else

 {

       // no CRYP

       // STM32H74x

 }

I got the information that during production process the crypto unit will be disabled at the 74X devices by laser.

Thanks again to all of you. Problem is solved. Chat is closed.

Alex

View solution in original post

6 REPLIES 6
KDJEM.1
ST Employee

Hello @aschu.1​ and welcome to the Community :) ;

A similar question is already asked here.

You can use the STM32 cube programmer to identify which type of MCU is connected by using a command line. So, I advise you to follow this User Manual (UM2237).

For example, the command "STM32_Programmer_CLI.exe -c port=SWD" returns the following:

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.12.0

   -------------------------------------------------------------------

ST-LINK SN : 066CFF515456707067145320

ST-LINK FW : V2J40M27

Board    : NUCLEO-F410RB

Voltage   : 3.26V

SWD freq  : 4000 KHz

Connect mode: Normal

Reset mode : Software reset

Device ID  : 0x458

Revision ID : Rev A

Device name : STM32F410

Flash size : 128 KBytes

Device type : MCU

Device CPU : Cortex-M4

BL Version : 0xB1

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Bob S
Principal

You mean software running ON the STM32 CPU, right? If so, try the HAL_GetDEVID() function, and look in the reference manual for those CPUs. This is usually described in the "Debug Support" section "MCU Device ID Code".

I don't know the H series specifically, but it is possible that those two parts have the same device ID. That is the case for the F427/429/437/439. Those CPUs differ only in the peripherals they support (for ex, the encryption module). However, you can't test for presence/absence of that module as it MAY appear in the 427 but not be fully tested/functional.

Check for stuck-at-zero bits in the related APB/AHB clocks for the peripherals, and within the HASH/CRYP peripherals themselves.

I think examples have been posted in the past.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I'm vaguely remembering @Pavel A.​ posting something.

There's one or two threads complain about H750 parts during certain production weeks having encryption fused off due to misconfigured test / production equipment, and it was under those threads.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Google works, OfficeSpace search is less helpful

https://community.st.com/s/question/0D53W000010RpinSAC/how-to-enable-the-stm32h750vbt6-hw-crypto

Pavel's code is down this one

https://community.st.com/s/question/0D53W00000XIIsCSAX/stm32h750vbt6-access-crypt-registers-all-read-back-zero

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aschu.1
Associate

Hello

thanks all for your answers.

The problem was solved by enabling the clock of the crypto unit and reading the status register.

In case of 75X device the status register is 0x0000 0003. In case of 74X device it is 0x0000 0000.

Here an example code:

uint32_t u32_DEVID;

 RCC->AHB2ENR |= 0x00000010; // Set CRYPTEN in AHB2ENR Register

  u32_DEVID = *((uint32_t*)(0x48021004)); // Read CRYP_SR @ address 0x48011004

  if (u32_DEVID == 0x00000003)

 {

       // CRYP present

       // STM32H75x

 }

 else

 {

       // no CRYP

       // STM32H74x

 }

I got the information that during production process the crypto unit will be disabled at the 74X devices by laser.

Thanks again to all of you. Problem is solved. Chat is closed.

Alex