2025-03-21 7:41 AM
Steps for a disaster!
1
2
3
Bang! Bang! Bang!
No words....
True, you understood? Come on, it's easy...
2025-03-21 8:38 AM
Hello @GMG
First let me thank you for posting.
I am sorry for the misbehavior your facing with our tool.
I will take charge of analyzing the case and provide you with answers ASAP.
However, it would be very nice of you if you tell me the MCU reference and if possible the STM32CubeMX configuration file (*.ioc)
Kind regards,
Semer.
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.
2025-03-21 8:55 AM
Hi, I can't send you the IOC because it is full of project pin labels. The screenshot explain actual configuaration and core. The problem is in M4 Core, but I think will be the same if USB is assigned to M7
STM32CubeIDE
Version: 1.18.0
Build: 24413_20250227_1633 (UTC)
2025-03-21 9:53 AM - edited 2025-03-21 9:53 AM
The M4 core can't access the UID registers that the library used to use to generate the serial number. It's not a new bug, has been around since at least 2021. Still a bug.
Error in the generated USB CDC code for the M4 cor... - STMicroelectronics Community
stm32h745i disco board USB with M4 core hard fault - STMicroelectronics Community
STM32H755 M4 core unable to read UID and therefore... - STMicroelectronics Community
If generated on the M7 core there is no bug.
2025-03-21 10:14 AM
I can understand, but here, there is also a concept problem, It's transforming an arbitrary constant to a memory pointer to read at that location an uint32. Define directly the value and you solve the problem.
2025-03-21 10:19 AM
I missed this with search, that is the right way to solve
error-in-the-generated-usb-cdc-code-for-the-m4-core-stm32h474