2018-07-06 04:44 AM
Posted on July 06, 2018 at 13:44
This is the now annual continuation of
https://community.st.com/thread/31122&sharpcomment-92068
and
https://community.st.com/thread/31122&sharpcomment-158898
(4th post of https://community.st.com/s/question/0D50X00009XkaB7SAJ/l4-cube-clearing-otggintsts-bits, and https://community.st.com/s/feed/0D50X00009XkVuPSAV - linkfix jan.2019]
as the original thread (which indeed was a collection of too many remarks) was closed with this issue being unresolved.
Setting the mysterious bit 15 in DOEPINT persist in the newest 1.12 version of Cube, together with using the undocumented CoreID:
Also, reading out the CoreID has been somewhat obfuscated in the new version, instead of using the USB registers typedef:
uint32_t USBx_BASE = (uint32_t)USBx;
uint32_t TempReg = USBx_BASE + 0x40U;
uint32_t gSNPSiD = *(uint32_t *) TempReg;
One would expect that this is because of the undocumented registers (not only the CoreID, but also the HWConfig registers) disappeared from the CMSIS-mandated device header, but it's not the case...
JW
null