disable CFG_TUD_CDC_FLUSH_ON_SOF to prevent usbd overflow
This commit is contained in:
		| @@ -128,6 +128,9 @@ static void wait_for_events(void) | |||||||
|         // USB stack |         // USB stack | ||||||
|         tusb_task(); |         tusb_task(); | ||||||
|  |  | ||||||
|  |         // Send out cdc's data | ||||||
|  |         tud_cdc_flush(); | ||||||
|  |  | ||||||
|         if ((m_update_status == BOOTLOADER_COMPLETE) || |         if ((m_update_status == BOOTLOADER_COMPLETE) || | ||||||
|             (m_update_status == BOOTLOADER_TIMEOUT)  || |             (m_update_status == BOOTLOADER_TIMEOUT)  || | ||||||
|             (m_update_status == BOOTLOADER_RESET)) |             (m_update_status == BOOTLOADER_RESET)) | ||||||
|   | |||||||
 Submodule lib/tinyusb updated: 5f1bec943b...84ef486418
									
								
							| @@ -167,7 +167,7 @@ | |||||||
|         </folder> |         </folder> | ||||||
|       </folder> |       </folder> | ||||||
|       <folder Name="tinyusb"> |       <folder Name="tinyusb"> | ||||||
|         <folder Name="tinyusb"> |         <folder Name="src"> | ||||||
|           <file file_name="../../lib/tinyusb/src/tusb.c" /> |           <file file_name="../../lib/tinyusb/src/tusb.c" /> | ||||||
|           <file file_name="../../lib/tinyusb/src/tusb.h" /> |           <file file_name="../../lib/tinyusb/src/tusb.h" /> | ||||||
|           <file file_name="../../lib/tinyusb/src/tusb_hal.h" /> |           <file file_name="../../lib/tinyusb/src/tusb_hal.h" /> | ||||||
|   | |||||||
| @@ -75,11 +75,15 @@ | |||||||
|  *------------------------------------------------------------------*/ |  *------------------------------------------------------------------*/ | ||||||
|  |  | ||||||
| // FIFO size of CDC TX and RX | // 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. | /* TX is sent automatically on every Start of Frame event ~ 1ms. | ||||||
| // If not enabled, application must call tud_cdc_flush() periodically |  * If not enabled, application must call tud_cdc_flush() periodically | ||||||
| #define CFG_TUD_CDC_FLUSH_ON_SOF    1 |  * 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 | // Number of supported Logical Unit Number | ||||||
| #define CFG_TUD_MSC_MAXLUN          1 | #define CFG_TUD_MSC_MAXLUN          1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user