如果是用到汇编就好咯。C语言可能不是很准的哦。delay_us(unsigned int n){ int i;for(i=0;i<n;i++){ _nop_();_nop_();} } 大概就是这样的咯。_nop_();就是一个空指令
void delay_us(u32 nus){ u32 ticks;u32 told,tnow,tcnt=0;u32 reload=SysTick->LOAD; /...
caternusoncommented Potential fix for#2. This adds a fixed delay between the triggering of an on demand measurement and the reading back of the value. A single value of 20ms is used, which should be a conservative worst case timing based on datasheet: Could add logic to set timing based...