Content originally posted in LPCWare by gbm on Tue Nov 16 13:17:08 MST 2010
Select some timer match channel x.
Set timer prescaler to (clock frequency in MHz -1), set EMR to toggle a MATx output on match, set MRx to 1 ms interval (999), select "reset on match x" in MCR, select timer match output pin function for a selected pin in IOCON register and start the timer, then go to sleep.
Oh, and dont't forget to enable clock for IOCON and a timer in SYSAHBCLKCTRL before programming the stuff.