diff options
| author | Gordon McNab <[email protected]> | 2022-11-28 17:41:00 +0000 |
|---|---|---|
| committer | Gordon McNab <[email protected]> | 2022-11-28 17:41:00 +0000 |
| commit | 1fce76ad472fe1936eedea0688960c76bd42fd40 (patch) | |
| tree | 7824a995bb5d45979c34e6b7a8f5cca1dba471f3 /hw | |
| parent | 9ccfb384e8dcbed314c25af698969bb5a17f3810 (diff) | |
Fix issue with the CDC SetLineCoding request
The SetLineCoding would fail as host would send the SETUP OUT phase before tinyUSB had setup a transaction for it. ft9xx port would ignore the transfer since there was no valid transaction setup for it. One SETUP data phase packet is cached now.
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/brtmm90x/family.c | 17 | ||||
| -rw-r--r-- | hw/bsp/brtmm90x/family.mk | 10 | ||||
| m--------- | hw/mcu/bridgetek/ft9xx/ft90x-sdk | 0 |
3 files changed, 21 insertions, 6 deletions
diff --git a/hw/bsp/brtmm90x/family.c b/hw/bsp/brtmm90x/family.c index 6b3c1f56c..77a03e909 100644 --- a/hw/bsp/brtmm90x/family.c +++ b/hw/bsp/brtmm90x/family.c @@ -27,8 +27,8 @@ #include "bsp/board.h" #include "board.h" -#include <registers/ft900_registers.h> #include <ft900.h> +#include <registers/ft900_registers.h> #if CFG_TUD_ENABLED int8_t board_ft90x_vbus(void); // Board specific implementation of VBUS detection for USB device. @@ -213,3 +213,18 @@ uint32_t board_millis(void) return safe_ms; } + +// Restart the program +// Called in the event of a watchdog timeout +void chip_reboot(void) +{ + // SOFT reset + __asm__("call 0"); + #if 0 + // HARD reset + // Initiates data transfer from Flash Memory to Data Memory (DBG_CMDF2D3) + // followed by a system reboot + dbg_memory_copy(0xfe, 0, 0, 255); +#endif +} + diff --git a/hw/bsp/brtmm90x/family.mk b/hw/bsp/brtmm90x/family.mk index 3933f15cc..a476cfc06 100644 --- a/hw/bsp/brtmm90x/family.mk +++ b/hw/bsp/brtmm90x/family.mk @@ -21,7 +21,7 @@ endif # Add include files which are within the TinyUSB directory structure. INC += \ - $(TOP)/$(BOARD_PATH) + $(TOP)/$(BOARD_PATH) # Add required C Compiler flags for FT90X. CFLAGS += \ @@ -30,14 +30,14 @@ CFLAGS += \ -fvar-tracking-assignments \ -fmessage-length=0 \ -ffunction-sections \ - -DCFG_TUSB_MCU=OPT_MCU_FT90X + -DCFG_TUSB_MCU=OPT_MCU_FT90X + +# Maximum USB device speed supported by the board +CFLAGS += -DBOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED # lwip/src/core/raw.c:334:43: error: declaration of 'recv' shadows a global declaration CFLAGS += -Wno-error=shadow -# Add include files outside the TinyUSB structure that are added manually. -CFLAGS += -I"$(FT9XX_SDK)/include" - # Set Linker flags. LD_FILE = hw/mcu/bridgetek/ft9xx/scripts/ldscript.ld LDFLAGS += $(addprefix -L,$(LDINC)) \ diff --git a/hw/mcu/bridgetek/ft9xx/ft90x-sdk b/hw/mcu/bridgetek/ft9xx/ft90x-sdk -Subproject c810d1312ded923c3c2ed9035c97bd0db4f35b5 +Subproject 0ea80ceafdf32e4e496cacc94178417e2ef4bf9 |
