0
0
Fork 0

fix(dap): JTAG speed

This commit is contained in:
windowsair 2021-05-31 12:46:20 +08:00
parent 126ad0adaa
commit b2c8a832cc
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/107881245-7d7d5580-6f1e-11eb-9f66-6ac589e5f95c.png"/></p>
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/120061980-49274280-c092-11eb-9916-4965f6c48388.png"/></p>
![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

View File

@ -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) {
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();