From b2c8a832cc2f55867bc60eaeb98f0a4f8ce500aa Mon Sep 17 00:00:00 2001 From: windowsair Date: Mon, 31 May 2021 12:46:20 +0800 Subject: [PATCH] fix(dap): JTAG speed --- README.md | 4 +++- components/DAP/source/DAP.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c88bc8a..7d19cbd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

![image](https://user-images.githubusercontent.com/17078589/107857220-05ecef00-6e68-11eb-9fa0-506b32052dba.png) @@ -51,6 +51,8 @@ You can change `WIFI_SSID` and ` WIFI_PASS` in [wifi_configuration.h](main/wifi_ You can also specify your IP in the above file (We recommend using the static address binding feature of the router). +![WIFI](https://user-images.githubusercontent.com/17078589/118365659-517e7880-b5d0-11eb-9a5b-afe43348c2ba.png) + ### Debugger diff --git a/components/DAP/source/DAP.c b/components/DAP/source/DAP.c index 973f0fb..8f4719e 100644 --- a/components/DAP/source/DAP.c +++ b/components/DAP/source/DAP.c @@ -385,10 +385,13 @@ static uint32_t DAP_SWJ_Clock(const uint8_t *request, uint8_t *response) { // clock >= 10MHz -> use 40MHz SPI if (clock >= 10000000) { - DAP_SPI_Init(); + if (DAP_Data.debug_port != DAP_PORT_JTAG) { + DAP_SPI_Init(); + SWD_TransferSpeed = kTransfer_SPI; + } DAP_Data.fast_clock = 1U; DAP_Data.clock_delay = 1U; - SWD_TransferSpeed = kTransfer_SPI; + } else if (clock >= 2000000) { // clock >= 2MHz -> Use GPIO with no program delay DAP_SPI_Deinit();