Content originally posted in LPCWare by cfbsoftware on Wed Oct 09 14:31:46 MST 2013
If you want a delay of 1 msec then you should set the prescale register to (PCLK / 1000) - 1 where PCLK is your peripheral clock speed. Watch out for rounding / truncation issues if PCLK is not a multiple of 1000.