fix(dap): Only setup SWD port when using SPI speed
Connection problems may occur at SPI speeds when DAP_Connect and DAP_SWJ_Clock are called in different orders. Let's setup SWD at SPI rates to avoid potential timing issues. (cherry picked from commit a89be4248eb7676109183183b0360dd57e02f039)
This commit is contained in:
parent
2426e56191
commit
0d8d7a014f
|
@ -236,7 +236,8 @@ static uint32_t DAP_Connect(const uint8_t *request, uint8_t *response) {
|
|||
#if (DAP_SWD != 0)
|
||||
case DAP_PORT_SWD:
|
||||
DAP_Data.debug_port = DAP_PORT_SWD;
|
||||
PORT_SWD_SETUP();
|
||||
if (SWD_TransferSpeed != kTransfer_SPI)
|
||||
PORT_SWD_SETUP();
|
||||
break;
|
||||
#endif
|
||||
#if (DAP_JTAG != 0)
|
||||
|
|
Loading…
Reference in New Issue