Changeset 631a092 in rtems


Ignore:
Timestamp:
Mar 4, 2011, 2:07:06 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10
Children:
7fce2ca
Parents:
5180f7c
Message:

2011-03-04 Joel Sherrill <joel.sherrilL@…>

PR 1748/bsps

  • clock/ckinit.c: When the clock tick generates an interrupt WHILE we have interrupts disabled doing a get TOD or uptime, the get nanoseconds handler was returning a bogusly large number.
Location:
c/src/lib/libbsp/sparc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/erc32/ChangeLog

    r5180f7c r631a092  
     12011-03-04      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        PR 1748/bsps
     4        * clock/ckinit.c: When the clock tick generates an interrupt WHILE we
     5        have interrupts disabled doing a get TOD or uptime, the get
     6        nanoseconds handler was returning a bogusly large number.
     7
    182011-03-03      Joel Sherrill <joel.sherrilL@OARcorp.com>
    29
  • c/src/lib/libbsp/sparc/erc32/clock/ckinit.c

    r5180f7c r631a092  
    5050{
    5151  uint32_t clicks;
     52  uint32_t usecs;
    5253
    5354  clicks = ERC32_MEC.Real_Time_Clock_Counter;
    5455
    55   return (uint32_t)
    56     (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
     56  if ( ERC32_Is_interrupt_pending( ERC32_INTERRUPT_REAL_TIME_CLOCK ) ) {
     57    clicks = ERC32_MEC.Real_Time_Clock_Counter;
     58    usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks);
     59  } else {
     60    usecs = (rtems_configuration_get_microseconds_per_tick() - clicks);
     61  }
     62  return usecs * 1000;
    5763}
    5864
  • c/src/lib/libbsp/sparc/leon2/ChangeLog

    r5180f7c r631a092  
     12011-03-04      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        PR 1748/bsps
     4        * clock/ckinit.c: When the clock tick generates an interrupt WHILE we
     5        have interrupts disabled doing a get TOD or uptime, the get
     6        nanoseconds handler was returning a bogusly large number.
     7
    182011-02-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    29
  • c/src/lib/libbsp/sparc/leon2/clock/ckinit.c

    r5180f7c r631a092  
    6363{
    6464  uint32_t clicks;
     65  uint32_t usecs;
    6566
    66   clicks = LEON_REG.Timer_Counter_1;
    67 
    68   /* Down counter */
    69   return (uint32_t)
    70      (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
     67  if ( LEON_Is_interrupt_pending( LEON_INTERRUPT_TIMER1 ) ) {
     68    clicks = LEON_REG.Timer_Counter_1;
     69    usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks);
     70  } else {
     71    usecs = (rtems_configuration_get_microseconds_per_tick() - clicks);
     72  }
     73  return usecs * 1000;
    7174}
    7275
Note: See TracChangeset for help on using the changeset viewer.