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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-15 12:45 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-22 1:52 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-17 7:06 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-17 8:01 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-17 8:15 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-17 8:31 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-17 8:34 AM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-22 1:52 AM
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
