@@ -32,38 +32,43 @@ menu "ESP-Hosted config"
32
32
bool "SPI Half-duplex"
33
33
help
34
34
Enable/Disable SPI Half-duplex host interface
35
+
36
+ config ESP_UART_HOST_INTERFACE
37
+ bool "UART"
38
+ help
39
+ Enable/Disable UART host interface
35
40
endchoice
36
41
37
42
choice ESP_HOSTED_SLAVE_CHIPSET_USED
38
43
bool "Slave chipset to be used"
39
44
default SLAVE_CHIPSET_ESP32C6
40
45
41
46
config SLAVE_CHIPSET_ESP32
42
- depends on ESP_SPI_HOST_INTERFACE || ESP_SDIO_HOST_INTERFACE
47
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SDIO_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
43
48
bool "Slave as ESP32"
44
49
45
50
config SLAVE_CHIPSET_ESP32S2
46
- depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
51
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
47
52
bool "Slave as ESP32S2"
48
53
49
54
config SLAVE_CHIPSET_ESP32S3
50
- depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
55
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
51
56
bool "Slave as ESP32S3"
52
57
53
58
config SLAVE_CHIPSET_ESP32C2
54
- depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
59
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
55
60
bool "Slave as ESP32C2"
56
61
57
62
config SLAVE_CHIPSET_ESP32C3
58
- depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
63
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
59
64
bool "Slave as ESP32C3"
60
65
61
66
config SLAVE_CHIPSET_ESP32C6
62
- depends on ESP_SPI_HOST_INTERFACE || ESP_SDIO_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
67
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SDIO_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
63
68
bool "Slave as ESP32C6"
64
69
65
70
config SLAVE_CHIPSET_ESP32C5
66
- depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE
71
+ depends on ESP_SPI_HOST_INTERFACE || ESP_SPI_HD_HOST_INTERFACE || ESP_UART_HOST_INTERFACE
67
72
bool "Slave as ESP32C5"
68
73
endchoice
69
74
@@ -664,16 +669,146 @@ ESP32XX_SPI_HD_CLK_FREQ_RANGE_MAX := 40
664
669
ENABLE/DISABLE software checksum
665
670
endmenu
666
671
672
+ menu "UART Configuration"
673
+ depends on ESP_UART_HOST_INTERFACE
674
+
675
+ choice ESP_UART_RESET_GPIO_CONFIG
676
+ bool "RESET GPIO Config"
677
+ default ESP_UART_RESET_ACTIVE_HIGH
678
+ help
679
+ "If Active High, High->Low->High will trigger reset (Low will trigger reset)
680
+ If Active Low, Low->High->Low will trigger reset (High will trigger reset)"
681
+
682
+ config ESP_UART_RESET_ACTIVE_HIGH
683
+ bool "RESET: Active High"
684
+ config ESP_UART_RESET_ACTIVE_LOW
685
+ bool "RESET: Active Low"
686
+ endchoice
687
+
688
+ config ESP_UART_PORT
689
+ int "UART Port to Use"
690
+ default 1
691
+ range 0 2 if IDF_TARGET_ESP32
692
+ range 0 1 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C6
693
+ range 0 2 if IDF_TARGET_ESP32C61
694
+ range 0 1 if IDF_TARGET_ESP32S2
695
+ range 0 2 if IDF_TARGET_ESP32S3
696
+ range 0 4 if IDF_TARGET_ESP32P4
697
+ help
698
+ Select UART Port to Use. Do not select the UART Port used for console output (if enabled)
699
+
700
+ config ESP_UART_PIN_TX
701
+ int "TX GPIO number"
702
+ default 13 if IDF_TARGET_ESP32
703
+ default 5 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3
704
+ default 14 if IDF_TARGET_ESP32C5
705
+ default 21 if IDF_TARGET_ESP32C6
706
+ default 5 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
707
+ default 14 if IDF_TARGET_ESP32P4
708
+ help
709
+ GPIO used for UART TX
710
+
711
+ config ESP_UART_PIN_RX
712
+ int "RX GPIO number"
713
+ default 12 if IDF_TARGET_ESP32
714
+ default 4 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3
715
+ default 13 if IDF_TARGET_ESP32C5
716
+ default 20 if IDF_TARGET_ESP32C6
717
+ default 4 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
718
+ default 15 if IDF_TARGET_ESP32P4
719
+ help
720
+ GPIO used for UART RX
721
+
722
+ config ESP_UART_BAUDRATE
723
+ int "Baud Rate"
724
+ default 921600
725
+ range 9600 3500000
726
+ help
727
+ Baud Rate to Use. Make sure Hardware supports the rate. Standard rates are 9600, 19200, 38400, 57600, 115200, 460800, 921600
728
+
729
+ config ESP_UART_NUM_DATA_BITS
730
+ int "Number of Data Bits"
731
+ default 8
732
+ range 5 8
733
+ help
734
+ Number of Data Bits to use
735
+
736
+ choice ESP_UART_PRIV_PARITY
737
+ bool "Parity"
738
+
739
+ config ESP_UART_PRIV_PARITY_NONE
740
+ bool "None"
741
+
742
+ config ESP_UART_PRIV_PARITY_EVEN
743
+ bool "Even"
744
+
745
+ config ESP_UART_PRIV_PARITY_ODD
746
+ bool "Odd"
747
+ endchoice
748
+
749
+ config ESP_UART_PARITY
750
+ int
751
+ default 0 if ESP_UART_PRIV_PARITY_NONE
752
+ default 1 if ESP_UART_PRIV_PARITY_EVEN
753
+ default 2 if ESP_UART_PRIV_PARITY_ODD
754
+
755
+ choice ESP_UART_PRIV_STOP_BITS
756
+ bool "Number of Stop Bits"
757
+
758
+ config ESP_UART_PRIV_STOP_BITS_1
759
+ bool "1"
760
+
761
+ config ESP_UART_PRIV_STOP_BITS_1_5
762
+ bool "1.5"
763
+
764
+ config ESP_UART_PRIV_STOP_BITS_2
765
+ bool "2"
766
+ endchoice
767
+
768
+ config ESP_UART_STOP_BITS
769
+ int
770
+ default 0 if ESP_UART_PRIV_STOP_BITS_1
771
+ default 1 if ESP_UART_PRIV_STOP_BITS_1_5
772
+ default 2 if ESP_UART_PRIV_STOP_BITS_2
773
+
774
+ config ESP_UART_GPIO_RESET_SLAVE
775
+ int "GPIO pin for Reseting slave ESP"
776
+ default 54 if IDF_TARGET_ESP32P4
777
+ default 42 if IDF_TARGET_ESP32S3
778
+ default 5
779
+ help
780
+ GPIO pin for Resetting ESP SDIO slave device. Should be connected to RST/EN of ESP SDIO slave device.
781
+
782
+ config ESP_UART_TX_Q_SIZE
783
+ int "Tx Queue Size"
784
+ default 5
785
+ help
786
+ Very small RX queue will lower ESP -- UART --> Host data rate
787
+
788
+ config ESP_UART_RX_Q_SIZE
789
+ int "Rx Queue Size"
790
+ default 5
791
+ help
792
+ Very small RX queue will lower ESP <-- UART -- Host data rate
793
+
794
+ config ESP_UART_CHECKSUM
795
+ bool "UART checksum ENABLE/DISABLE"
796
+ default y
797
+ help
798
+ ENABLE/DISABLE software UART checksum
799
+ endmenu
800
+
667
801
config ESP_GPIO_SLAVE_RESET_SLAVE
668
802
int
669
803
default ESP_SPI_GPIO_RESET_SLAVE if ESP_SPI_HOST_INTERFACE
670
804
default ESP_SDIO_GPIO_RESET_SLAVE if ESP_SDIO_HOST_INTERFACE
671
805
default ESP_SPI_HD_GPIO_RESET_SLAVE if ESP_SPI_HD_HOST_INTERFACE
806
+ default ESP_UART_GPIO_RESET_SLAVE if ESP_UART_HOST_INTERFACE
672
807
673
808
config RESET_GPIO_ACTIVE_LOW
674
809
bool
675
- default n if SDIO_RESET_ACTIVE_HIGH || SPI_RESET_ACTIVE_HIGH || SPI_HD_RESET_ACTIVE_HIGH
676
- default y if SDIO_RESET_ACTIVE_LOW || SPI_RESET_ACTIVE_LOW || SPI_HD_RESET_ACTIVE_LOW
810
+ default n if SDIO_RESET_ACTIVE_HIGH || SPI_RESET_ACTIVE_HIGH || SPI_HD_RESET_ACTIVE_HIGH || ESP_UART_RESET_ACTIVE_HIGH
811
+ default y if SDIO_RESET_ACTIVE_LOW || SPI_RESET_ACTIVE_LOW || SPI_HD_RESET_ACTIVE_LOW || ESP_UART_RESET_ACTIVE_LOW
677
812
678
813
menu "Bluetooth Support"
679
814
@@ -824,12 +959,22 @@ ESP32XX_SPI_HD_CLK_FREQ_RANGE_MAX := 40
824
959
Host will throttle incoming data if the slave datapath Rx load goes beyond this threshold
825
960
0 value will disable this function
826
961
962
+ config PRIV_WIFI_TX_UART_HIGH_THRESHOLD
963
+ depends on HOST_TO_ESP_WIFI_DATA_THROTTLE && ESP_UART_HOST_INTERFACE
964
+ int "High threshold to report host to drop data when wifi highly loaded"
965
+ range 0 100
966
+ default 80
967
+ help
968
+ Host will throttle incoming data if the slave datapath Rx load goes beyond this threshold
969
+ 0 value will disable this function
970
+
827
971
config TO_WIFI_DATA_THROTTLE_HIGH_THRESHOLD
828
972
depends on HOST_TO_ESP_WIFI_DATA_THROTTLE
829
973
int
830
974
default PRIV_WIFI_TX_SPI_HIGH_THRESHOLD if ESP_SPI_HOST_INTERFACE
831
975
default PRIV_WIFI_TX_SDIO_HIGH_THRESHOLD if ESP_SDIO_HOST_INTERFACE
832
976
default PRIV_WIFI_TX_SPI_HD_HIGH_THRESHOLD if ESP_SPI_HD_HOST_INTERFACE
977
+ default PRIV_WIFI_TX_UART_HIGH_THRESHOLD if ESP_UART_HOST_INTERFACE
833
978
834
979
config TO_WIFI_DATA_THROTTLE_LOW_THRESHOLD
835
980
depends on HOST_TO_ESP_WIFI_DATA_THROTTLE
0 commit comments