Commit 42bdbe3f by vielex

Checked final version.

parent 605e8ed3
Showing with 9 additions and 6 deletions
...@@ -102,12 +102,15 @@ int main(void){ unsigned long i,last,now; ...@@ -102,12 +102,15 @@ int main(void){ unsigned long i,last,now;
GPIO_PORTF_DATA_R &=~0x02; GPIO_PORTF_DATA_R &=~0x02;
} }
if(i<50 && changed){ if(i<50 && changed){
changed = false; changed = false;
now = NVIC_ST_CURRENT_R; now = NVIC_ST_CURRENT_R;
Time[i] = (last-now)&0x00FFFFFF; // 24-bit time difference Time[i] = (last-now)&0x00FFFFFF; // 24-bit time difference
Data[i] = GPIO_PORTF_DATA_R&0x13; // record PF4,1,0 Data[i] = GPIO_PORTF_DATA_R&0x13; // record PF4,1,0
last = now; last = now;
i++; i++;
}
if (i==50)
i=0;
} }
Delay(); Delay();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment