mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
hwtimer ticks at 8 * 32768 Hz rather than 250 KHz, so adjust our timing appropriately. Also ensure that udelay() will delay for at least the requested time, taking into account our timer precision. BUG=b:63858553 TEST=Generate square wave with 1000us udelay between GPIO edge toggle, verify period is 1000us + code overhead. Also verify timer behavior on overflow with 'forcetime' command. Also verify accuracy of system clock to 0.2% with `timerinfo` and a stopwatch. BRANCH=None Change-Id: I5da41bd7250db87de5143cc54ebd0bb750fb7003 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/578551 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>