用openOCD debug? -f interface/cmsis-dap.cfg -f target/stm32f1x.cfg systick ? void systick_config(void) { /* setup systick timer for 1000Hz interrupts */ if (SysTick_Config(SystemCoreClock / 1000000U)){ /* capture error */ while (1){ } } /* configure the systick handler priority */ NVIC_SetPriority(SysTick_IRQn, 0x00U); } /*! \brief delay a time in milliseconds \param[in] count: count in milliseconds \param[out] none \retval none */ void delay_1ms(uint32_t count) { delay = count*1000; while(0U != delay){ } }