Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: clk/clktime.c
- Revision:
- 67:c44c5c90e35a
- Parent:
- 63:28738aaad2a8
- Child:
- 68:807c1c7b2c22
--- a/clk/clktime.c	Mon May 27 10:10:40 2019 +0000
+++ b/clk/clktime.c	Fri Sep 27 11:29:57 2019 +0000
@@ -29,21 +29,25 @@
      clktime fraction = (timerCountSinceLastSecond << CLK_TIME_ONE_SECOND_SHIFT) / HR_TIMER_COUNT_PER_SECOND;
      clktime    ticks = extClock - fraction;
 
-    __disable_irq();
+    //__disable_irq();
+    __asm("CPSID I");
         tickCount = ticks;
         slewCount = 0;
-    __enable_irq();
+    //__enable_irq();
+    __asm("CPSIE I");
     
     countIsSet = true;
 }
 void ClkTimeIncrementByOneSecond(uint32_t startCount)
 {
-    __disable_irq();
+    //__disable_irq();
+    __asm("CPSID I");
         hrTimerAtLastIncrement = startCount;
         tickCount += CLK_TIME_ONE_SECOND + ClkGovGetPpb();
         slewCount += ClkGovGetSlew();
         ClkGovSetSlew(0);
-    __enable_irq();
+    //__enable_irq();
+    __asm("CPSIE I");
 }
 
 static volatile  clktime  tickSnapshot;