diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..b9660a8 --- /dev/null +++ b/.clangd @@ -0,0 +1,16 @@ +CompileFlags: + Add: + - -Wno-unknown-warning-option + - -Wno-format + Remove: + - -mlongcalls + - -fstrict-volatile-bitfields + - -fno-tree-switch-conversion + + +--- + +If: + PathMatch: .*\.h +Diagnostics: + UnusedIncludes: None diff --git a/.gitignore b/.gitignore index d408e14..72715c4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /build /sdkconfig.old /main/wifi-credentials.h -.DS_Store \ No newline at end of file +.DS_Store +.cache \ No newline at end of file diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 8874b03..55bc9be 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -12,6 +12,7 @@ set(SOURCES "network-http.c" "network-gdb.c" "network-uart.c" + "network-dap.c" "cli-uart.c" "cli/cli.c" "cli/cli-commands.c" diff --git a/main/main.c b/main/main.c index 4718843..4d0e6bb 100644 --- a/main/main.c +++ b/main/main.c @@ -14,6 +14,7 @@ #include "network-http.h" #include "network-gdb.h" #include "network-uart.h" +#include "network-dap.h" #include "factory-reset-service.h" #include @@ -66,6 +67,7 @@ void app_main(void) { network_http_server_init(); network_gdb_server_init(); network_uart_server_init(); + network_dap_server_init(); usb_init(); cli_uart_init(); diff --git a/main/network-dap.c b/main/network-dap.c new file mode 100644 index 0000000..ddaecee --- /dev/null +++ b/main/network-dap.c @@ -0,0 +1,215 @@ +#include "dap_config.h" +#include "freertos/portmacro.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "led.h" +#include "usb.h" +#include "delay.h" +#include "network-dap.h" +#include "dap.h" + +#define PORT 2806 +#define KEEPALIVE_IDLE 5 +#define KEEPALIVE_INTERVAL 5 +#define KEEPALIVE_COUNT 3 +#define TAG "network-dap" + +#define DAP_TAG "dap2" + +#define DAP_SERVER_PRIORITY 5 + +typedef struct { + bool connected; + int socket_id; +} NetworkDAP; + +static NetworkDAP network_dap; + +void dap_callback_connect(void) { + ESP_LOGI(TAG, "connected"); + led_set(0, 0, 0); + network_dap.connected = true; +} + +void dap_callback_disconnect(void) { + ESP_LOGI(TAG, "disconnected"); + led_set(255, 0, 0); + network_dap.connected = false; +} + +bool dap_is_connected(void) { + return network_dap.connected; +} + +bool network_dap_connected(void) { + return network_dap.connected; +} + +static void receive_and_send_to_dap(void) { + size_t rx_size = SIZE_MAX; + size_t gdb_packet_size = DAP_CONFIG_PACKET_SIZE; + uint8_t* buffer_rx = malloc(gdb_packet_size); + + uint8_t tx_data[DAP_CONFIG_PACKET_SIZE]; + + TickType_t prev_send = 0; + do { + // size_t max_len = gdb_glue_get_free_size(); + size_t max_len = 64; + if(max_len > gdb_packet_size) max_len = gdb_packet_size; + led_set_red(255); + rx_size = recv(network_dap.socket_id, buffer_rx, max_len, 0); + + // ESP_LOGW(TAG, "+%d", xTaskGetTickCount() - prev_send); + if(rx_size > 0) { + // ESP_LOGW(TAG, "Received %d bytes", rx_size); + // gdb_glue_receive(buffer_rx, rx_size); + // send(network_dap.socket_id, buffer_rx, rx_size, 0); + TickType_t ticks_pre = xTaskGetTickCount(); + + led_set_red(0); + + led_set_blue(255); + size_t tx_size = dap_process_request(buffer_rx, rx_size, tx_data, sizeof(tx_data)); + led_set_blue(0); + + // ESP_LOGW(TAG, "Processed to %d bytes", (uint32_t)tx_size); + + led_set_green(255); + send(network_dap.socket_id, tx_data, tx_size, 0); + prev_send = xTaskGetTickCount(); + // ESP_LOGW(TAG, ">%d(%d)", tx_size, prev_send - ticks_pre); + led_set_green(0); + } + } while(rx_size > 0); + + free(buffer_rx); +} + +static void network_dap_server_task(void* pvParameters) { + char addr_str[128]; + int addr_family = (int)pvParameters; + int ip_protocol = 0; + int keepAlive = 1; + int keepIdle = KEEPALIVE_IDLE; + int keepInterval = KEEPALIVE_INTERVAL; + int keepCount = KEEPALIVE_COUNT; + network_dap.connected = false; + struct sockaddr_storage dest_addr; + + if(addr_family == AF_INET) { + struct sockaddr_in* dest_addr_ip4 = (struct sockaddr_in*)&dest_addr; + dest_addr_ip4->sin_addr.s_addr = htonl(INADDR_ANY); + dest_addr_ip4->sin_family = AF_INET; + dest_addr_ip4->sin_port = htons(PORT); + ip_protocol = IPPROTO_IP; + // ip_protocol = IPPROTO_UDP; + } + + int listen_sock = socket(addr_family, SOCK_STREAM, ip_protocol); + if(listen_sock < 0) { + ESP_LOGE(TAG, "Unable to create socket: errno %d", errno); + vTaskDelete(NULL); + return; + } + int opt = 1; + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); + + ESP_LOGI(TAG, "Socket created"); + + int err = bind(listen_sock, (struct sockaddr*)&dest_addr, sizeof(dest_addr)); + if(err != 0) { + ESP_LOGE(TAG, "Socket unable to bind: errno %d", errno); + ESP_LOGE(TAG, "IPPROTO: %d", addr_family); + goto CLEAN_UP; + } + ESP_LOGI(TAG, "Socket bound, port %d", PORT); + + err = listen(listen_sock, 1); + if(err != 0) { + ESP_LOGE(TAG, "Error occurred during listen: errno %d", errno); + goto CLEAN_UP; + } + + while(1) { + ESP_LOGI(TAG, "Socket listening"); + + struct sockaddr_storage source_addr; // Large enough for both IPv4 or IPv6 + socklen_t addr_len = sizeof(source_addr); + int sock = accept(listen_sock, (struct sockaddr*)&source_addr, &addr_len); + if(sock < 0) { + ESP_LOGE(TAG, "Unable to accept connection: errno %d", errno); + break; + } + + // Set tcp keepalive option + // setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &keepAlive, sizeof(int)); + int nodelay = 1; + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(int)); + // setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &keepIdle, sizeof(int)); + // setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &keepInterval, sizeof(int)); + // setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &keepCount, sizeof(int)); + + // Convert ip address to string + if(source_addr.ss_family == PF_INET) { + inet_ntoa_r( + ((struct sockaddr_in*)&source_addr)->sin_addr, addr_str, sizeof(addr_str) - 1); + } + + ESP_LOGI(TAG, "Socket accepted ip address: %s", addr_str); + + // continue only if DAP-Link is not connected + if(!dap_is_connected()) { + led_set_blue(255); + delay(5); + led_set_blue(0); + + ESP_LOGI(TAG, "Accepting networked DAP-Link connection"); + + network_dap.socket_id = sock; + network_dap.connected = true; + + receive_and_send_to_dap(); + + network_dap.connected = false; + network_dap.socket_id = -1; + + led_set_blue(255); + delay(5); + led_set_blue(0); + } else { + ESP_LOGE(TAG, "DAP-Link is connected, not accepting connection"); + } + + shutdown(sock, 0); + close(sock); + } + +CLEAN_UP: + close(listen_sock); + vTaskDelete(NULL); +} + +void network_dap_server_init(void) { + network_dap.connected = false; + network_dap.socket_id = -1; + + esp_wifi_set_ps(WIFI_PS_NONE); + xTaskCreate(network_dap_server_task, "network_dap_server", 4096, (void*)AF_INET, DAP_SERVER_PRIORITY, NULL); +} diff --git a/main/network-dap.h b/main/network-dap.h new file mode 100644 index 0000000..002511e --- /dev/null +++ b/main/network-dap.h @@ -0,0 +1,22 @@ +/** + * @file network-gdb.h + * @author Sergey Gavrilov (who.just.the.doctor@gmail.com) + * @version 1.0 + * @date 2021-11-25 + * + * GDB server API + */ + +#pragma once +#include + +/** + * Start DAP server + */ +void network_dap_server_init(void); + +/** + * Checks if someone is connected to the DAP server + * @return bool + */ +bool network_dap_connected(void); diff --git a/main/network-gdb.c b/main/network-gdb.c index d5bb5e7..4c94e1e 100644 --- a/main/network-gdb.c +++ b/main/network-gdb.c @@ -143,7 +143,7 @@ static void network_gdb_server_task(void* pvParameters) { delay(10); led_set_blue(0); - ESP_LOGI(TAG, "DAP-Link is connected, not accepting connection"); + ESP_LOGI(TAG, "Accepted GDB connection"); network_gdb.socket_id = sock; network_gdb.connected = true; @@ -157,7 +157,7 @@ static void network_gdb_server_task(void* pvParameters) { delay(10); led_set_blue(0); } else { - ESP_LOGE(TAG, "DAP-Link is connected, not accepting connection"); + ESP_LOGE(TAG, "DAP-Link is connected, not accepting GDB connection"); } shutdown(sock, 0); diff --git a/main/usb.c b/main/usb.c index d156548..b109b42 100644 --- a/main/usb.c +++ b/main/usb.c @@ -128,21 +128,21 @@ static void dap_rx_callback(void* context) { xTaskNotify(dap_task_handle, DAP_RECEIVE_FLAG, eSetBits); } -void dap_callback_connect(void) { - ESP_LOGI(DAP_TAG, "connected"); - led_set(0, 0, 0); - dap_link_connected = true; -} - -void dap_callback_disconnect(void) { - ESP_LOGI(DAP_TAG, "disconnected"); - led_set(255, 0, 0); - dap_link_connected = false; -} - -bool dap_is_connected(void) { - return dap_link_connected; -} +// void dap_callback_connect(void) { +// ESP_LOGI(DAP_TAG, "connected"); +// led_set(0, 0, 0); +// dap_link_connected = true; +// } + +// void dap_callback_disconnect(void) { +// ESP_LOGI(DAP_TAG, "disconnected"); +// led_set(255, 0, 0); +// dap_link_connected = false; +// } + +// bool dap_is_connected(void) { +// return dap_link_connected; +// } static void dap_task(void* arg) { ESP_LOGI(DAP_TAG, "started"); @@ -218,7 +218,7 @@ void usb_init(void) { usb_state.connected = false; usb_uart_init(); - usb_dap_init(); + // usb_dap_init(); usb_glue_init(USBDeviceTypeDapLink); } diff --git a/sdkconfig b/sdkconfig index 01c3254..407dbf3 100644 --- a/sdkconfig +++ b/sdkconfig @@ -50,6 +50,14 @@ CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set CONFIG_BOOTLOADER_LOG_LEVEL=0 + +# +# Serial Flash Configurations +# +# CONFIG_BOOTLOADER_FLASH_DC_AWARE is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Serial Flash Configurations + CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set @@ -63,7 +71,6 @@ CONFIG_BOOTLOADER_WDT_TIME_MS=9000 # CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y # end of Bootloader config # @@ -184,6 +191,8 @@ CONFIG_APPTRACE_LOCK_ENABLE=y # CONFIG_ASIO_SSL_SUPPORT is not set # end of ESP-ASIO +CONFIG_BT_ALARM_MAX_NUM=50 + # # CoAP Configuration # @@ -223,6 +232,7 @@ CONFIG_ADC_DISABLE_DAC=y # TWAI configuration # # CONFIG_TWAI_ISR_IN_IRAM is not set +# CONFIG_TWAI_ERRATA_FIX_LISTEN_ONLY_DOM is not set # end of TWAI configuration # @@ -261,6 +271,13 @@ CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y # # ESP32S2-specific # +CONFIG_ESP32S2_REV_MIN_0=y +# CONFIG_ESP32S2_REV_MIN_1 is not set +CONFIG_ESP32S2_REV_MIN_FULL=0 +CONFIG_ESP_REV_MIN_FULL=0 +CONFIG_ESP32S2_REV_MAX_FULL_STR_OPT=y +CONFIG_ESP32S2_REV_MAX_FULL=199 +CONFIG_ESP_REV_MAX_FULL=199 # CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 is not set # CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y @@ -291,16 +308,11 @@ CONFIG_SPIRAM_TYPE_AUTO=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=-1 - -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set CONFIG_SPIRAM_SPEED_80M=y # CONFIG_SPIRAM_SPEED_40M is not set # CONFIG_SPIRAM_SPEED_26M is not set @@ -432,6 +444,7 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y # CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set # CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set # CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +CONFIG_ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS=y # end of Sleep Config # @@ -450,6 +463,10 @@ CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 # LCD and Touch Panel # +# +# LCD Touch Drivers are maintained in the IDF Component Registry +# + # # LCD Peripheral Configuration # @@ -473,7 +490,12 @@ CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 +# CONFIG_ESP_PHY_REDUCE_TX_POWER is not set # CONFIG_ESP_PHY_ENABLE_USB is not set +CONFIG_ESP_PHY_RF_CAL_PARTIAL=y +# CONFIG_ESP_PHY_RF_CAL_NONE is not set +# CONFIG_ESP_PHY_RF_CAL_FULL is not set +CONFIG_ESP_PHY_CALIBRATION_MODE=0 # end of PHY # @@ -482,6 +504,13 @@ CONFIG_ESP_PHY_MAX_TX_POWER=20 # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -547,6 +576,10 @@ CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=32 CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +CONFIG_ESP_WIFI_STATIC_RX_MGMT_BUFFER=y +# CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER is not set +CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0 +CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF=5 # CONFIG_ESP32_WIFI_CSI_ENABLED is not set # CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED is not set # CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED is not set @@ -563,6 +596,8 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 # end of Wi-Fi # @@ -634,11 +669,7 @@ CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_MASTER_TIMER_GROUP=0 -CONFIG_FMB_MASTER_TIMER_INDEX=0 -# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is not set # end of Modbus configuration # @@ -651,7 +682,7 @@ CONFIG_FREERTOS_CORETIMER_0=y # CONFIG_FREERTOS_CORETIMER_1 is not set CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set @@ -743,7 +774,9 @@ CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y # CONFIG_LWIP_LOCAL_HOSTNAME="blackmagic.local" # CONFIG_LWIP_NETIF_API is not set +CONFIG_LWIP_TCPIP_TASK_PRIO=18 # CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +# CONFIG_LWIP_CHECK_THREAD_SAFETY is not set CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y # CONFIG_LWIP_L2_TO_L3_COPY is not set # CONFIG_LWIP_IRAM_OPTIMIZATION is not set @@ -755,6 +788,7 @@ CONFIG_LWIP_SO_REUSE=y CONFIG_LWIP_SO_REUSE_RXTOALL=y # CONFIG_LWIP_SO_RCVBUF is not set # CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP_DEFAULT_TTL=64 CONFIG_LWIP_IP4_FRAG=y CONFIG_LWIP_IP6_FRAG=y # CONFIG_LWIP_IP4_REASSEMBLY is not set @@ -764,12 +798,15 @@ CONFIG_LWIP_IP6_FRAG=y # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set CONFIG_LWIP_ESP_GRATUITOUS_ARP=y CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_ESP_MLDV6_REPORT=y +CONFIG_LWIP_MLDV6_TMR_INTERVAL=40 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_COARSE_TIMER_SECS=1 # # DHCP server @@ -799,10 +836,13 @@ CONFIG_LWIP_TCP_SYNMAXRTX=12 CONFIG_LWIP_TCP_MSS=1440 CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=20000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +CONFIG_LWIP_TCP_OOSEQ_TIMEOUT=6 +CONFIG_LWIP_TCP_OOSEQ_MAX_PBUFS=0 # CONFIG_LWIP_TCP_SACK_OUT is not set # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set CONFIG_LWIP_TCP_OVERSIZE_MSS=y @@ -858,6 +898,13 @@ CONFIG_LWIP_SNTP_MAX_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 # end of SNTP +# +# DNS +# +CONFIG_LWIP_DNS_MAX_SERVERS=3 +# CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT is not set +# end of DNS + CONFIG_LWIP_ESP_LWIP_ASSERT=y # @@ -1082,6 +1129,20 @@ CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" # end of PThreads +# +# Main Flash configuration +# + +# +# Optional and Experimental Features (READ DOCS FIRST) +# + +# +# Features here require specific hardware (READ DOCS FIRST!) +# +# end of Optional and Experimental Features (READ DOCS FIRST) +# end of Main Flash configuration + # # SPI Flash driver # @@ -1180,6 +1241,15 @@ CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=256 CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED=y # CONFIG_USB_HOST_HW_BUFFER_BIAS_IN is not set # CONFIG_USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT is not set + +# +# Root Hub configuration +# +CONFIG_USB_HOST_DEBOUNCE_DELAY_MS=250 +CONFIG_USB_HOST_RESET_HOLD_MS=30 +CONFIG_USB_HOST_RESET_RECOVERY_MS=30 +CONFIG_USB_HOST_SET_ADDR_RECOVERY_MS=10 +# end of Root Hub configuration # end of USB-OTG # @@ -1276,6 +1346,8 @@ CONFIG_STACK_CHECK_NONE=y CONFIG_ESP32_APPTRACE_DEST_NONE=y CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y CONFIG_ADC2_DISABLE_DAC=y +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 # CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y @@ -1285,6 +1357,7 @@ CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# CONFIG_ESP32_REDUCE_PHY_TX_POWER is not set # CONFIG_ESP32S2_PANIC_PRINT_HALT is not set CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set @@ -1320,8 +1393,6 @@ CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_MB_CONTROLLER_STACK_SIZE=4096 CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048