A bug is present when using STM32CubeIDE to generate code that uses USBX with the CDC-ECM device class.
The ux_device_descriptors.c file contains following code:
#if USBD_CDC_ECM_CLASS_ACTIVATED == 1
/* Set MAC_STRING_INDEX and MAC_STRING in string_framework */
count += len + 1;
USBD_string_framework[count++] = USBD_LANGID_STRING & 0xFF;
USBD_string_framework[count++] = USBD_LANGID_STRING >> 8;
USBD_string_framework[count++] = CDC_ECM_MAC_STRING_INDEX;
/* Set the Mac address in USBD_string_framework */
USBD_Desc_GetString((uint8_t *)CDC_ECM_LOCAL_MAC_STR_DESC, USBD_string_framework + count, &len);
#endif /* USBD_CDC_ECM_CLASS_ACTIVATED */
However, CDC_ECM_LOCAL_MAC_STR_DESC is wrong here, it should be CDC_ECM_REMOTE_MAC_STR_DESC.
See also here:
The remote node must be the same one as the one declared in the device framework string descriptor.
A bug is present when using STM32CubeIDE to generate code that uses USBX with the CDC-ECM device class.
The ux_device_descriptors.c file contains following code:
However,
CDC_ECM_LOCAL_MAC_STR_DESCis wrong here, it should beCDC_ECM_REMOTE_MAC_STR_DESC.See also here: