Dear Lei Wen, In message <aanlktin0hqkxkilas8h4_ghmfsdi1mt3gpbtk0a17...@mail.gmail.com> you wrote: > > >> + while (loop--); > > > > Please write: > > > > while (loop--) > > ; > > Fixed... > > > > But then - are you sure the compiler does not optimize this out? You > > probably want to use __udelay() instead. > > From the practice, we think this loop is enough to make timer stablize...
There is nothing in this code to prevent the cmpiler from optimizing this out. You can as well delete these lines then. If you need a delay, then you must do better. > Involve the __udelay() may not suitable for the timer functions... Depends... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "The pathology is to want control, not that you ever get it, because of course you never do." - Gregory Bateson _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot