mirror of
https://github.com/ylj2000/DAPLink_X033.git
synced 2026-09-27 06:26:16 +00:00
Add jumptoBL & Remove dap clock *10
This commit is contained in:
@@ -412,7 +412,7 @@ static uint32_t DAP_SWJ_Clock(const uint8_t *request, uint8_t *response) {
|
||||
(uint32_t)(*(request+2) << 16) |
|
||||
(uint32_t)(*(request+3) << 24);
|
||||
|
||||
clock *= 10;
|
||||
// clock *= 10;
|
||||
|
||||
if (clock == 0U) {
|
||||
*response = DAP_ERROR;
|
||||
|
||||
@@ -11,6 +11,23 @@ int main(void)
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
||||
SystemCoreClockUpdate();
|
||||
|
||||
RCC->APB2PCENR |= RCC_APB2Periph_GPIOA;
|
||||
GPIOA->CFGLR &= ~(0x0F << (4 * 4)); // RST,GPIOA4
|
||||
GPIOA->CFGLR |= 0x08 << (4 * 4);
|
||||
GPIOA->BSHR = 1 << 4;
|
||||
|
||||
for (volatile uint32_t i = 0; i < 100; i++)
|
||||
{
|
||||
__NOP();
|
||||
}
|
||||
|
||||
uint8_t temp = (GPIOA->INDR >> 4) & 0x01;
|
||||
if (temp == 0)
|
||||
{
|
||||
SystemReset_StartMode(Start_Mode_BOOT);
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
DAP_Init();
|
||||
DAP_USB_Init();
|
||||
|
||||
|
||||
Binary file not shown.
+972
-963
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user