Closed UnguidedFreedom closed 2 months ago
Hi @UnguidedFreedom,
Thank you for having reported. The behavior you reported could be reproduced. Our development teams will be notified. I will keep you informed.
With regards,
ST Internal Reference: 180337
Hi @UnguidedFreedom,
By the way, constant UX_SLAVE_REQUEST_DATA_MAX_LENGTH
is commented out in one of the many applications provided within the STM32CubeU5 firmware, as you can see below. Let's wait for our development teams' feedback.
With regards,
Hi @UnguidedFreedom,
Our development teams acknowledged the issue. A fix will be available in the frame of STM32CubeMX
release 6.12.0. As there is no impact on the software provided within this repository, please allow me to close this issue.
Thank you for your comprehension and thank you again for having reported.
With regards,
Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project. For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post your report to the ST Community in the STM32 MCUs dedicated page.
Describe the set-up
Describe the bug (skip if none)
When setting up USBX in STM32CubeMX with STM32CubeU5 in MSC mode, if I set
UX_SLAVE_REQUEST_DATA_MAX_LENGTH
to any value other than 4096, then there is a#define
directive inUSBX/App/ux_user.h
, however if I set it to exactly 4096, that line is commented out.The problem is that Middlewares/ST/usbx/ports/generic/inc/ux_port.h has code that defaults
UX_SLAVE_REQUEST_DATA_MAX_LENGTH
to 2048 if it isn't set.Putting those two things together means that if I set
UX_SLAVE_REQUEST_DATA_MAX_LENGTH
to 4096 in STM32CubeMX, the actual value in my code will be 2048.How to reproduce the bug (skip if none)
UX_SLAVE_REQUEST_DATA_MAX_LENGTH
to 4096 in STM32CubeMXUX_SLAVE_REQUEST_DATA_MAX_LENGTH
is 2048 despite what was set in STM32CubeMXAdditional context
I was able to find a workaround by defining a custom constant
UX_SLAVE_REQUEST_DATA_MAX_LENGTH
for USBX (which creates the constant inmain.h
), then updateUSBX/App/ux_user.h
to add#include "main.h"
in theUSER CODE BEGIN 1
part.Screenshots