Dear Reinhard, On Sun, May 22, 2011 at 6:15 PM, Reinhard Meyer <u-b...@emk-elektronik.de> wrote: > Dear J. William Campbell, > > please demonstrate for me (and others), by a practical example, > how _any_ arithmetic (even less with just shifts and multiplies) > can convert a free running 3.576 MHz (wild example) free running > 32 bit counter (maybe software extended to 64 bits) into a ms > value that will properly wrap from 2**32-1 to 0 ? > > I fail to see how that will be possible...
These may help: http://blogs.msdn.com/b/devdev/archive/2005/12/12/502980.aspx http://www.hackersdelight.org/divcMore.pdf of Google 'division of unsigned integer by a constant' Basically you will be dividing by a constant value of 3576 which can be highly optimised Regards, Graeme _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot