Perhaps your clocks are not as you expect. Would suggest you toggle a GPIO in your SysTick IRQ, and measure that on a scope. Should see a 500 Hz signal (period 2ms, 1ms High, 1ms Low).
Check you input clocks. Check internal clocks and settings. Use MCO pin. Make sure your project has the correct target, and that any model settings are correct. ZIP up a complete project example, and post it as an attachment. Personally I'd use the following construct starttick = systicker; while((systicker - starttick) < 3000);
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..