diff options
| author | hathach <[email protected]> | 2013-04-27 14:17:06 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-27 14:17:06 +0700 |
| commit | 4db386525f0df0d7a17266da1607f5d9ce820b72 (patch) | |
| tree | ebfa73461a7c17120b158a7d825506e043f2dbeb | |
| parent | 8bd077fa5c21ade1aa791b0339b66e637ad894e5 (diff) | |
reduce delay after reset to 20ms
correct freeRTOS configCPU_CLOCK_HZ to correct M4 mcu clock
| -rw-r--r-- | tinyusb/host/usbh.c | 4 | ||||
| -rw-r--r-- | vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index 333d2d9a2..a8a9aa3b6 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -289,8 +289,8 @@ tusb_error_t enumeration_body_subtask(void) usbh_devices[0].state = TUSB_DEVICE_STATE_ADDRESSED; #ifndef _TEST_ - // TODO hack delay 100 ms for slow device (use retry on the 1st xfer instead later) - osal_task_delay(100); + // TODO hack delay 20 ms for slow device (use retry on the 1st xfer instead later) + osal_task_delay(20); #endif //------------- Get first 8 bytes of device descriptor to get Control Endpoint Size -------------// diff --git a/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h b/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h index 19837b322..e744aef5e 100644 --- a/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h +++ b/vendor/freertos/lpc43xx_m4_FreeRTOSConfig.h @@ -55,9 +55,9 @@ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H -//#include "hal/hal.h" #include "LPC43xx.h" #include "core_cm4.h" +#include "lpc43xx_cgu.h" /*----------------------------------------------------------- * Application specific definitions. @@ -74,7 +74,8 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ( SystemCoreClock ) +//#define configCPU_CLOCK_HZ ( SystemCoreClock ) +#define configCPU_CLOCK_HZ ( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 16 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) |
