我用NUC140读写DS1302,时间不走。调试时发现进到函数
void DrvSYS_Delay(uint32_t us)
{
uint16_t i;
SysTick->LOAD = us * CyclesPerUs;
SysTick->VAL = (0x00);
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
//* Waiting for down-count to zero
while((SysTick->CTRL & (1 << 16)) == 0)
{
}
}
里面去了,在while循环那里出不来。请高手指教,谢谢!
|