Repository navigation
STM32C0 DFU Slower When Not Behind Hub #4324
Unanswered
AnthonyV-modretro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Operating System
Linux
Commit SHA
b2e3ba8
Board
Custom with STM32C071GBU6
Firmware
Custom firmware running tinyusb in a dedicated threadx task.
What happened ?
When I do a DFU update to my STM32C071 when not running behind a HUB and connected to my Linux Ubuntu 26.04 LTS Thinkpad Latpop with a USB-C cable, the DFU update is relatively slow. However, when I do the update behind a hub it gets significantly faster. I am hoping this performance can be realized without a hub present as well.
How to reproduce ?
Use the following configuration:
tusb_config.h Settings
// defined by compiler flags for flexibility
#define STM32C071xx
#define CFG_TUSB_MCU OPT_MCU_STM32C0
#ifndef CFG_TUSB_MCU
#error CFG_TUSB_MCU must be defined
#endif
#ifndef CFG_TUSB_OS
#define CFG_TUSB_OS OPT_OS_THREADX
#endif
#ifndef CFG_TUSB_DEBUG
#define CFG_TUSB_DEBUG 0
#endif
// Enable Device stack
#define CFG_TUD_ENABLED 1
// Default is max speed that hardware controller could support with on-chip PHY
#define CFG_TUD_MAX_SPEED BOARD_TUD_MAX_SPEED
Buffer Sizes:
CFG_TUD_DFU_XFER_BUFSIZE is set to 64
Descriptors:
enum {
ITF_NUM_CDC_0,
ITF_NUM_CDC_DATA_0,
ITF_NUM_DFU_RT,
ITF_NUM_TOTAL
};
#define DFU_DETACH_TIMEOUT_ms 1000
#define ALT_COUNT 3
#define FUNC_ATTRS ( DFU_ATTR_CAN_UPLOAD | DFU_ATTR_CAN_DOWNLOAD | DFU_ATTR_MANIFESTATION_TOLERANT )
TUD_DFU_DESCRIPTOR( ITF_NUM_DFU_RT, ALT_COUNT, 5, FUNC_ATTRS, DFU_DETACH_TIMEOUT_ms, CFG_TUD_DFU_XFER_BUFSIZE ),
Steps:
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
N/A. Debug Logs cannot be gathered due to C++ environment and how the UART's are setup on the custom board.
Screenshots
No response
I have checked existing issues, discussion and documentation
All reactions