Skip to content

Commit e7e3b04

Browse files
committed
feat(dap): Set pad drive strength for esp32s3/esp32c3
The drive strength has a significant impact on signal integrity. In actual use, it is necessary to perform signal measurements on the board and select the appropriate drive strength.
1 parent 3827e80 commit e7e3b04

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Diff for: components/DAP/config/DAP_config.h

+10-9
Original file line numberDiff line numberDiff line change
@@ -1002,15 +1002,16 @@ __STATIC_INLINE void DAP_SETUP(void)
10021002
GPIO_FUNCTION_SET(PIN_nTRST);
10031003
GPIO_FUNCTION_SET(PIN_nRESET);
10041004

1005-
// GPIO_FUNCTION_SET(PIN_LED_RUNNING);
1006-
1007-
1008-
// Configure: LED as output (turned off)
1009-
1010-
// GPIO_SET_DIRECTION_NORMAL_OUT(PIN_LED_RUNNING);
1011-
1012-
// LED_CONNECTED_OUT(0);
1013-
// LED_RUNNING_OUT(0);
1005+
/**
1006+
* The drive strength has a significant impact on signal integrity.
1007+
* In actual use, it is necessary to perform signal measurements
1008+
* on the board and select the appropriate drive strength.
1009+
*/
1010+
#if defined (CONFIG_IDF_TARGET_ESP32S3) || defined (CONFIG_IDF_TARGET_ESP32C3)
1011+
// 5mA for esp32c3/esp32s3
1012+
gpio_ll_set_drive_capability(&GPIO, PIN_SWCLK, GPIO_DRIVE_CAP_0);
1013+
gpio_ll_set_drive_capability(&GPIO, PIN_SWDIO_MOSI, GPIO_DRIVE_CAP_0);
1014+
#endif
10141015

10151016
PORT_OFF();
10161017
}

0 commit comments

Comments
 (0)