瀏覽代碼

Set USBHS_USBCMD_ITC to 1, workaround for race condition in some drivers

main
PaulStoffregen 3 年之前
父節點
當前提交
efaf5cb56f
共有 2 個檔案被更改,包括 10 行新增1 行删除
  1. +9
    -0
      USBHost_t36.h
  2. +1
    -1
      ehci.cpp

+ 9
- 0
USBHost_t36.h 查看文件

@@ -62,6 +62,15 @@
//#define USBHOST_PRINT_DEBUG


// When developing a new driver, please edit ehci.cpp to set
// USBHS_USBCMD_ITC to zero. Today we set USBHS_USBCMD_ITC(1)
// because some drivers have race conditions exposed by
// non-delayed interrupts. Eventually USBHS_USBCMD_ITC will
// be changed to 0. Please test any new driver code with
// USBHS_USBCMD_ITC(0) so it won't break in the future when
// this change is made!


// This can let you control where to send the debugging messages
//#define USBHDBGSerial Serial1
#ifndef USBHDBGSerial

+ 1
- 1
ehci.cpp 查看文件

@@ -239,7 +239,7 @@ void USBHost::begin()
USBHS_PERIODICLISTBASE = (uint32_t)periodictable;
USBHS_FRINDEX = 0;
USBHS_ASYNCLISTADDR = 0;
USBHS_USBCMD = USBHS_USBCMD_ITC(0) | USBHS_USBCMD_RS |
USBHS_USBCMD = USBHS_USBCMD_ITC(1) | USBHS_USBCMD_RS |
USBHS_USBCMD_ASP(3) | USBHS_USBCMD_ASPE | USBHS_USBCMD_PSE |
#if PERIODIC_LIST_SIZE == 8
USBHS_USBCMD_FS2 | USBHS_USBCMD_FS(3);

Loading…
取消
儲存