cancel
Showing results for 
Search instead for 
Did you mean: 

USB bug in latest STM32CubeIDE update and a workaround

HWhit.1
Associate III

Hi,

I had previously set up a USB serial  communication that has been working with multiple STM32 types and in multiple projects. With the latest update to STM32CubeIDE Version: 1.15.0 Build: 20695_20240315_1429 (UTC) I had a problem.

Problem: unassigned variable warnings in USB_DEVICE/App/usbd_desc.c when tried to build the project. The project runs but the COM port number changes with each restart of the MCU which is very inconvenient for practical use.

Workaround: In the file USB_DEVICE/App/usbd_desc.c edit the routine starting to replace the missing commands as per below.

I hope this helps. Maybe it could be fixed in a new release.

H.

 

/**

* @brief Create the serial number string descriptor

* @param None

* @retval None

*/

static void Get_SerialNum(void)

{

uint32_t deviceserial0;

uint32_t deviceserial1;

uint32_t deviceserial2;

 

deviceserial0 = *(uint32_t *) DEVICE_ID1; // Missing

deviceserial1 = *(uint32_t *) DEVICE_ID2; // Missing

deviceserial2 = *(uint32_t *) DEVICE_ID3; // Missing

 

deviceserial0 += deviceserial2;

 

if (deviceserial0 != 0)

{

IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);

IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);

}

}

 

/**

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @HWhit.1 

 This issue was fixed in CubeMX6.11.1 which is already published in the st.com

Best Regards.

STTwo-32

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.

View solution in original post

2 REPLIES 2
STTwo-32
ST Employee

Hello @HWhit.1 

Thank you for reporting this. I think you are tooking about the same issue reported on this post which has been reported internally to the Dev team (under internal ticket number 177153) to correct it ASAP. Thanks again for reporting.

Best Regards.

STTwo-32 

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.

STTwo-32
ST Employee

Hello @HWhit.1 

 This issue was fixed in CubeMX6.11.1 which is already published in the st.com

Best Regards.

STTwo-32

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.