Content originally posted in LPCWare by black_ghost on Sat Oct 15 17:10:19 MST 2011
Quote: StephenHawkings
If your SysTick counts every 10ms, then with 6MHz it counts to 0.01s / 0.167us = 60.000. If you want to count every 10ms for 100MHz, it needs to count to 0.01s / 0.01us = 1.000.000.
void SysTick_Wait10ms(unsigned long delay){
unsigned long i;
for(i=0; i<delay; i++){
SysTick_Wait(60000); // wait 10ms (assumes 6 MHz clock)
}
would be
SysTick_Wait(1000000); // wait 10ms (assumes 100 MHz clock)
But I think you should check for the interrupts; I can't see any ISR for SysTick. But INT is enabled.
Please check, SysTick counting speed is in collaboration with CPU clock and prescaler.
SH
Ok but how i will go about using the interrupts could you please show me the right direction or a good explanation and i could go from there. thanks