diff --git a/lib/sdk11/components/libraries/bootloader_dfu/bootloader.c b/lib/sdk11/components/libraries/bootloader_dfu/bootloader.c index 1f423e6..9ca40e4 100644 --- a/lib/sdk11/components/libraries/bootloader_dfu/bootloader.c +++ b/lib/sdk11/components/libraries/bootloader_dfu/bootloader.c @@ -128,6 +128,9 @@ static void wait_for_events(void) // USB stack tusb_task(); + // Send out cdc's data + tud_cdc_flush(); + if ((m_update_status == BOOTLOADER_COMPLETE) || (m_update_status == BOOTLOADER_TIMEOUT) || (m_update_status == BOOTLOADER_RESET)) diff --git a/lib/tinyusb b/lib/tinyusb index 5f1bec9..84ef486 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 5f1bec943b2a227d6b6f2188644c7641828787e7 +Subproject commit 84ef486418fe1d1e83217c8bdc55aaad2456a5fd diff --git a/src/segger/nrf52840_bootloader.emProject b/src/segger/nrf52840_bootloader.emProject index 7b54fe3..e1065e7 100644 --- a/src/segger/nrf52840_bootloader.emProject +++ b/src/segger/nrf52840_bootloader.emProject @@ -167,7 +167,7 @@ - + diff --git a/src/usb/tusb_config.h b/src/usb/tusb_config.h index d33efb8..88a4a97 100644 --- a/src/usb/tusb_config.h +++ b/src/usb/tusb_config.h @@ -75,11 +75,15 @@ *------------------------------------------------------------------*/ // FIFO size of CDC TX and RX -#define CFG_TUD_CDC_BUFSIZE 1024 +#define CFG_TUD_CDC_RX_BUFSIZE 1024 +#define CFG_TUD_CDC_TX_BUFSIZE 1024 -// TX is sent automatically every Start of Frame event. -// If not enabled, application must call tud_cdc_flush() periodically -#define CFG_TUD_CDC_FLUSH_ON_SOF 1 +/* TX is sent automatically on every Start of Frame event ~ 1ms. + * If not enabled, application must call tud_cdc_flush() periodically + * Note: Enabled this could overflow device task, if it does, define + * CFG_TUD_TASK_QUEUE_SZ with large value + */ +#define CFG_TUD_CDC_FLUSH_ON_SOF 0 // Number of supported Logical Unit Number #define CFG_TUD_MSC_MAXLUN 1