问答

汇集网友智慧,解决技术难题

铁头娃666

TA的家园币:969  

  • 航顺单片机程序总是死

    程序死在了自带库的微秒延时voidBSP_SYSTEM_Delay_us(uint32_tusCnt){/*SysTickdefaultclocksource:HCLK/8=32MHz/8=4MHz*/SysTick->LOAD=4*usCnt;/*ClearSysTickcurrentcountervalue*/SysTick->VAL=0;/*EnableSysTickcounter*/SysTick->CTRL=SysTick_CTRL_ENABLE_Msk;/*WaitforSysTickcounterto0*/while(!(SysTick->CTRL&SysTick_CTRL_COUNTFLAG_Msk))//死在这一部{}/*DisableSysTickcounter*/SysTick->CTRL=~SysTick_CTRL_ENABLE_Msk;/*ClearSysTickcurrentcountervalue*/SysTick->VAL=0;}

    单片机程序 ck ST systick ic TI

    2021-09-08 4