Add jumptoBL & Remove dap clock *10

This commit is contained in:
ylj
2024-06-05 19:26:35 +08:00
parent a94009b2f5
commit a6a7aea010
4 changed files with 990 additions and 964 deletions
+1 -1
View File
@@ -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;
+17
View File
@@ -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.
File diff suppressed because it is too large Load Diff