summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/imx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-07 18:00:38 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-07 18:00:38 -0600
commitf4f8030be0af79250de05d323106dd34a5e7dc85 (patch)
treeac6ac62508e391422efee525bc3c438206e31259 /nuttx/arch/arm/src/imx
parentf39ae5a8b656f320d99f391972e8b81a8c2d52fd (diff)
downloadpx4-nuttx-f4f8030be0af79250de05d323106dd34a5e7dc85.tar.gz
px4-nuttx-f4f8030be0af79250de05d323106dd34a5e7dc85.tar.bz2
px4-nuttx-f4f8030be0af79250de05d323106dd34a5e7dc85.zip
Change all time conversions. Yech. New timer units in microseconds breaks all existing logic that used milliseconds in the conversions. Something likely got broken doing this, probably because I confused a MSEC2TICK conversion with a TICK2MSEC conversion. Also, the tickless OS no appears fully functional and passes the OS test on the simulator with no errors
Diffstat (limited to 'nuttx/arch/arm/src/imx')
-rw-r--r--nuttx/arch/arm/src/imx/imx_timerisr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/imx/imx_timerisr.c b/nuttx/arch/arm/src/imx/imx_timerisr.c
index 64db2e06d..d21b804c6 100644
--- a/nuttx/arch/arm/src/imx/imx_timerisr.c
+++ b/nuttx/arch/arm/src/imx/imx_timerisr.c
@@ -138,11 +138,11 @@ void up_timer_initialize(void)
* putreg(0, IMX_TIMER1_TPRER); -- already the case
*
* Set the compare register so that the COMP interrupt is generated
- * with a period of MSEC_PER_TICK. The value IMX_PERCLK1_FREQ/1000
+ * with a period of USEC_PER_TICK. The value IMX_PERCLK1_FREQ/1000
* (defined in board.h) is the number of counts in millisecond, so:
*/
- putreg32((IMX_PERCLK1_FREQ / 1000) * MSEC_PER_TICK, IMX_TIMER1_TCMP);
+ putreg32(MSEC2TICK(IMX_PERCLK1_FREQ / 1000), IMX_TIMER1_TCMP);
/* Configure to provide timer COMP interrupts when TCN increments
* to TCMP.