2021-02-24 07:23 AM
Hi all,
I have two different batches of Revision V STM32H750VBT6. All units in one of the batches (Date Code 045) has issue with the hash peripheral while the one (Date Code 928) is working completely fine.
I created a new basic project for testing this issue and the code is as shown. However, HAL_HASHEx_SHA256_Start() always ended up returning HAL_TIMEOUT. Based on the SFR register view in Atollic TrueSTUDIO, all the registers for hash peripheral remains at value 0x0.
*Note : The same project is working fine for Revision V STM32H750VBT6 (Date Code 928) and Revision Y STM32H750VBT6 (Date Code 002) *
Things I have done/tried
MX_HASH_Init();
uint8_t data[256] = {1,2,3,4,5};
uint8_t digest[64];
HAL_StatusTypeDef halStatus = HAL_HASHEx_SHA256_Start(&(hhash), data, 256, digest, 1000);
Could it be that there are defects in the MCU ? Thanks.
2021-02-24 08:09 AM
How confident are you in the source of these parts?
Looks like the unit is not enabled.
The UNIQUE ID might be a useful reference point, as would the FLASH size
printf("UNIQUE %08X-%08X-%08X\n",
*((uint32_t *)0x1FF1E800),
*((uint32_t *)0x1FF1E804),
*((uint32_t *)0x1FF1E808));
printf("FLASH %d KB\n", *((uint16_t *)0x1FF1E880));
void CORECheck(void) // sourcer32@gmail.com
{
uint32_t cpuid = SCB->CPUID;
uint32_t var, pat;
printf("CPUID %08X DEVID %03X REVID %04X\n", cpuid, DBGMCU->IDCODE & 0xFFF, (DBGMCU->IDCODE >> 16) & 0xFFFF);
pat = (cpuid & 0x0000000F);
var = (cpuid & 0x00F00000) >> 20;
if ((cpuid & 0xFF000000) == 0x41000000) // ARM
{
switch((cpuid & 0x0000FFF0) >> 4)
{
case 0xC20 : printf("Cortex M0 r%dp%d\n", var, pat); break;
case 0xC60 : printf("Cortex M0+ r%dp%d\n", var, pat); break;
case 0xC21 : printf("Cortex M1 r%dp%d\n", var, pat); break;
case 0xC23 : printf("Cortex M3 r%dp%d\n", var, pat); break;
case 0xC24 : printf("Cortex M4 r%dp%d\n", var, pat); break;
case 0xC27 : printf("Cortex M7 r%dp%d\n", var, pat); break;
default : printf("Unknown CORE\n");
}
}
else
printf("Unknown CORE IMPLEMENTER\n");
}
2021-02-24 09:17 AM
Hi @Community member
The MCU is purchased from Element14.
Yup it indeed looks that the peripheral is not enabled properly.
MX_HASH_Init() is called for enabling and initializing the peripheral before calling HAL_HASHEx_SHA256_Start();
FYI,
CPUID 411FC271 DEVID 450 REVID 2003
Cortex M7 r1p1
UNIQUE 0033002D-3230510D-31303431
FLASH 128 KB
2021-02-25 04:44 AM
Hello @CShen and welcome to the STM32 Community :smiling_face_with_smiling_eyes:
Thank you for posting your issue.
I recommend you to contact your FAE as they will be able to work more closely with you as more detailed information may be needed which should not be posted in a public community.
Imen