Get_SerialNum () crashes when USB middleware is used in STM32H7 CM4 core. - Workaround?
Hello dear people,
Of course, the reason is that Get_SerialNum () tries to read the device ID (UID_BASE), which unfortunately is not supported in CM4 core. So i get a Hard Fault.
I do have a solution getting the UID from the CM7 core, but alas, it's quite difficult to put this solution into the cube-generated source code.
One workaround would be, to have an USER CODE area somewhere before the buggy code (in USBD_HS_SerialStrDescriptor before the call of Get_SerialNum or in Get_SerialNum before the buggy code). Then i could simply execute different code and then just return, so to skip that particular code.
So can anyone tell me how to change the Cube template in that way?
Any better solutions to fix this?
Thanks in advance!
-Albert
