diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/cstimer.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/cstimer.cpp
index 0a86f0f90a1dded48d9e4179372a34544433a9b0..f42630e9753ba6515f3ea011333f34128a447405 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/cstimer.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/cstimer.cpp
@@ -1,10 +1,6 @@
 #include "interfaces/cstimer.h"
-#include "interfaces/arch_registers.h"
-#include "kernel/kernel.h"
-#include "kernel/scheduler/timer_interrupt.h"
 #include "kernel/timeconversion.h"
 #include "cstimer_impl.h"
-#include "high_resolution_timer_base.h"
 
 using namespace miosix;
 
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.cpp
index b16190d8a7814946489c10634ae379795e44e3d3..dba5b41676b1f4b16196b8922c0425aabcb54519 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.cpp
@@ -147,6 +147,7 @@ GPIOtimer& GPIOtimer::instance(){
 }
 
 GPIOtimer::GPIOtimer(): b(HighResolutionTimerBase::instance()),tc(b.getTimerFrequency()) {
+    b.setModeGPIOTimer(true);
     expansion::gpio10::mode(Mode::INPUT);
     isInput=true;
 }
\ No newline at end of file
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.h b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.h
index 5b2c6575b8e4c8c89fd401db8adce94fa9e9587e..289434b268754fea5e6f2bbc897502b8149b7fcd 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.h
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/gpio_timer.h
@@ -13,7 +13,7 @@
 
 #include "high_resolution_timer_base.h"
 #include "hwmapping.h"
-#include "timer.h"
+#include "timer_interface.h"
 
 #ifndef GPIO_TIMER_H
 #define GPIO_TIMER_H
@@ -22,7 +22,7 @@ static volatile int aux=0;
 
 namespace miosix {
     
-    class GPIOtimer : public TimerInterface{    
+    class GPIOtimer : public HardwareTimer{    
     public:
         static Thread *tWaitingGPIO;
         static long long aux1;
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/high_resolution_timer_base.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/high_resolution_timer_base.cpp
index 143bc137b3a2becb6bbe33ae3940b2374b9ead5f..b40c6b8c1d2d024302cb85da09bff8094286f705 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/high_resolution_timer_base.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/high_resolution_timer_base.cpp
@@ -27,11 +27,12 @@ const unsigned long long overflowIncrement=(1LL<<timerBits);
 const unsigned long long lowerMask=overflowIncrement-1;
 const unsigned long long upperMask=0xFFFFFFFFFFFFFFFFLL-lowerMask;
 
-static long long ms32time = 0; //most significant 32 bits of counter
+static long long ms32time = 0;		//most significant 32 bits of counter
 static long long ms32chkp[3] = {0,0,0}; //most significant 32 bits of check point
 static TimeConversion* tc;
 
-static int fase=0;
+static int faseGPIO=0;
+static int faseRadio=0;
 
 static inline unsigned int IRQread32Timer(){
     unsigned int high=TIMER3->CNT;
@@ -58,7 +59,7 @@ inline void interruptGPIOTimerRoutine(){
     if(TIMER1->CC[2].CTRL & TIMER_CC_CTRL_MODE_OUTPUTCOMPARE){
 	TIMER1->CC[2].CTRL = (TIMER1->CC[2].CTRL & ~_TIMER_CC_CTRL_CMOA_MASK) | TIMER_CC_CTRL_CMOA_CLEAR;
 	//10 tick are enough to execute this line
-	TIMER1->CC[2].CCV = static_cast<unsigned int>(TIMER1->CNT+10);//static_cast<unsigned int>(tick & 0xFFFF);
+	TIMER1->CC[2].CCV = static_cast<unsigned short>(TIMER1->CNT+10);//static_cast<unsigned int>(tick & 0xFFFF);
     }
     //Reactivating the thread that is waiting for the event.
     if(GPIOtimer::tWaitingGPIO){
@@ -73,7 +74,7 @@ inline void interruptGPIOTimerRoutine(){
 inline void interruptRadioTimerRoutine(){
     if(TIMER2->CC[1].CTRL & TIMER_CC_CTRL_MODE_OUTPUTCOMPARE){
 	TIMER2->CC[1].CTRL = (TIMER2->CC[1].CTRL & ~_TIMER_CC_CTRL_CMOA_MASK) | TIMER_CC_CTRL_CMOA_CLEAR;
-	TIMER2->CC[1].CCV = static_cast<unsigned int>(TIMER2->CNT+10);//static_cast<unsigned int>(tick & 0xFFFF);
+	TIMER2->CC[1].CCV = static_cast<unsigned short>(TIMER2->CNT+10);//static_cast<unsigned int>(tick & 0xFFFF);
     }
     
     //Reactivating the thread that is waiting for the event.
@@ -165,11 +166,18 @@ void __attribute__((used)) cstirqhnd3(){
 }
 
 void __attribute__((used)) cstirqhnd2(){
-    if ((TIMER2->IEN & TIMER_IEN_CC0) && (TIMER2->IF & TIMER_IF_CC0)){
+    //CC0 listening for received packet 
+    if ((TIMER2->IEN & TIMER_IEN_CC0) && (TIMER2->IF & TIMER_IF_CC0) ){
 	 TIMER2->IEN &= ~ TIMER_IEN_CC0;
 	 TIMER2->IFC = TIMER_IFC_CC0;
 	 interruptRadioTimerRoutine();
     }
+    //CC1 for output/trigger
+    if ((TIMER2->IEN & TIMER_IEN_CC1) && (TIMER2->IF & TIMER_IF_CC1) ){
+	 TIMER2->IEN &= ~ TIMER_IEN_CC1;
+	 TIMER2->IFC = TIMER_IFC_CC1;
+	 interruptRadioTimerRoutine();
+    }
 }
 
 /*
@@ -185,7 +193,7 @@ void __attribute__((used)) cstirqhnd1(){
     //This if is used to manage the case of GPIOTimer, both INPUT and OUTPUT mode
     if ((TIMER1->IEN & TIMER_IEN_CC2) && (TIMER1->IF & TIMER_IF_CC2)){
         TIMER1->IFC = TIMER_IFC_CC2;
-	if(fase==0){
+	if(faseGPIO==0){
 	    HighResolutionTimerBase& b=HighResolutionTimerBase::instance();
 	    
 	    //get nextInterrupt
@@ -193,7 +201,7 @@ void __attribute__((used)) cstirqhnd1(){
 	    long long diff=t-b.IRQgetCurrentTick();
 	    if(diff<=0xFFFF){
 		TIMER1->CC[2].CTRL = (TIMER1->CC[2].CTRL & ~_TIMER_CC_CTRL_CMOA_MASK) | TIMER_CC_CTRL_CMOA_SET;
-		fase=1;
+		faseGPIO=1;
 	    }
 	}else{
 	    TIMER1->IEN &= ~TIMER_IEN_CC2;
@@ -263,30 +271,28 @@ long long HighResolutionTimerBase::getCurrentTick(){
 }
 
 WaitResult HighResolutionTimerBase::IRQsetNextRadioInterrupt(long long tick){
-    TIMER2->IEN &= ~TIMER_IEN_CC1;
+    long long curTick = IRQgetTick(); // This require almost 1us about 50ticks
+    long long diff=tick-curTick;
     
-    long long curTick = IRQgetTick();
-    if(curTick >= tick){
-	// The interrupt is in the past => call timerInt immediately
-	interruptGPIOTimerRoutine();
-	return WaitResult::WAKEUP_IN_THE_PAST;
-    }else{ 
-	ms32chkp[0] = tick & upperMask;
-	TIMER3->CC[0].CCV = static_cast<unsigned int>((tick & 0xFFFF0000)>>16)-1;
+    // 150 are enough to make sure that this routine ends and the timer IEN is enabled. 
+    //NOTE: this is really dependent on compiler, optimization and other stuff
+    if(diff>150){
+	faseRadio=0;
+	unsigned short t1=static_cast<unsigned short>((tick & 0xFFFF)-1);
+	//ms32chkp[0] is going to store even the middle part, because we don't need to use TIMER3
+	ms32chkp[0] = tick & (upperMask | 0xFFFF0000);
+	TIMER2->CC[1].CCV = t1;
+
 	TIMER2->IFC = TIMER_IFC_CC1;
-	TIMER2->CC[1].CCV = static_cast<unsigned int>(tick & 0xFFFF);
-	
-	fase=0;
 	TIMER2->IEN |= TIMER_IEN_CC1;
-	if(TIMER2->IF & TIMER_IF_CC1 && tick<=IRQgetTick()){
-	    TIMER2->IEN &= ~TIMER_IEN_CC1;
-	    TIMER2->IFC = TIMER_IFC_CC1;
-	    // If TIM1 matches by the time it is being enabled, call the routine right away
-	    interruptRadioTimerRoutine();
-	    return WaitResult::EVENT;
+	//0xFFFF because it's the roundtrip of timer
+	if(diff<=0xFFFF){
+	    TIMER2->CC[1].CTRL = (TIMER2->CC[1].CTRL & ~_TIMER_CC_CTRL_CMOA_MASK) | TIMER_CC_CTRL_CMOA_SET;
+	    faseRadio=1; //if phase=1, this means that we have to shutdown the pin next time that TIMER1 triggers
 	}
 	return WaitResult::WAITING;
-	//return setupTimers2();
+    }else{
+	return WaitResult::WAKEUP_IN_THE_PAST;
     }
 } 
 
@@ -320,9 +326,8 @@ WaitResult HighResolutionTimerBase::IRQsetNextGPIOInterrupt(long long tick){
     // 150 are enough to make sure that this routine ends and the timer IEN is enabled. 
     //NOTE: this is really dependent on compiler, optimization and other stuff
     if(diff>150){
-	fase=0;
-	unsigned short t1=static_cast<unsigned short>((tick & 0xFFFF)-1),
-		    t3=static_cast<unsigned short>(((tick & 0xFFFF0000)>>16)-1);
+	faseGPIO=0;
+	unsigned short t1=static_cast<unsigned short>((tick & 0xFFFF)-1);
 	//ms32chkp[2] is going to store even the middle part, because we don't need to use TIMER3
 	ms32chkp[2] = tick & (upperMask | 0xFFFF0000);
 	TIMER1->CC[2].CCV = t1;
@@ -332,7 +337,7 @@ WaitResult HighResolutionTimerBase::IRQsetNextGPIOInterrupt(long long tick){
 	//0xFFFF because it's the roundtrip of timer
 	if(diff<=0xFFFF){
 	    TIMER1->CC[2].CTRL = (TIMER1->CC[2].CTRL & ~_TIMER_CC_CTRL_CMOA_MASK) | TIMER_CC_CTRL_CMOA_SET;
-	    fase=1; //if phase=1, this means that we have to shutdown the pin next time that TIMER1 triggers
+	    faseGPIO=1; //if phase=1, this means that we have to shutdown the pin next time that TIMER1 triggers
 	}
 	return WaitResult::WAITING;
     }else{
@@ -363,7 +368,7 @@ void HighResolutionTimerBase::setModeGPIOTimer(bool input){
 			|   TIMER_CC_CTRL_INSEL_PRS
 			|   TIMER_CC_CTRL_ICEDGE_BOTH
 			|   TIMER_CC_CTRL_MODE_INPUTCAPTURE;
-	
+	faseGPIO=1;
     }else{
         TIMER1->CC[2].CTRL = TIMER_CC_CTRL_MODE_OUTPUTCOMPARE;
         TIMER3->CC[2].CTRL = TIMER_CC_CTRL_MODE_OUTPUTCOMPARE; 
@@ -392,7 +397,7 @@ void HighResolutionTimerBase::setModeRadioTimer(bool input){
 	//TIMER3->CC2 as consumer
 	TIMER3->CC[0].CTRL=TIMER_CC_CTRL_PRSSEL_PRSCH1
 			|   TIMER_CC_CTRL_INSEL_PRS
-			|   TIMER_CC_CTRL_ICEDGE_BOTH
+			|   TIMER_CC_CTRL_ICEDGE_RISING
 			|   TIMER_CC_CTRL_MODE_INPUTCAPTURE;
     }else{ // Gpio<GPIOA_BASE,9>  stxon
 	TIMER2->CC[1].CTRL = TIMER_CC_CTRL_MODE_OUTPUTCOMPARE;
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/power_manager.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/power_manager.cpp
index e832949efcc23442f1447c895367136a47649b4d..ba1bd2cf3c13d2437ddcad8e2a57b9a5fb07b723 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/power_manager.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/power_manager.cpp
@@ -27,7 +27,7 @@
 
 #include "power_manager.h"
 #include "board_settings.h"
-#include "hardware_timer.h"
+#include "rtc.h"
 #include "transceiver.h"
 #include "interfaces/bsp.h"
 #include <stdexcept>
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.cpp
index 38c6e7c5533d484542e5c2cb08378e33f49f3839..ed7245f058067a2d260603a028b1d50ef2367df1 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.cpp
@@ -34,6 +34,19 @@ bool RadioTimer::absoluteWait(long long tick){
 }
 
 bool RadioTimer::absoluteWaitTrigger(long long tick){
+    FastInterruptDisableLock dLock;
+    b.setModeRadioTimer(false);			//output timer 
+    if(b.IRQsetNextRadioInterrupt(tick)==WaitResult::WAKEUP_IN_THE_PAST){
+	return true;
+    }
+    do {
+	tWaiting=Thread::IRQgetCurrentThread();
+	Thread::IRQwait();
+	{
+	    FastInterruptEnableLock eLock(dLock);
+	    Thread::yield();
+	}
+    } while(tWaiting && tick>b.getCurrentTick());
     return false;
 }
 
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.h b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.h
index 8ffba3858829e5aab4f3dd2c549c5d6b9599472d..000bfd2b392e21cd267407913e3c12a99ea90d10 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.h
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/radio_timer.h
@@ -12,16 +12,16 @@
  */
 
 #include "high_resolution_timer_base.h"
-#include "timer.h"
+#include "timer_interface.h"
 
 #ifndef RADIO_TIMER_H
 #define RADIO_TIMER_H
 
 namespace miosix{
-    class RadioTimer : public TimerInterface {
+    class RadioTimer : public HardwareTimer {
         public:
-            //transceiver::excChB //usato per la ricezione INPUT_CAPTURE
-            //transceiver::stxon //usato per attivare la trasmissione OUTPUTCOMPARE
+            //transceiver::excChB //usato per la ricezione INPUT_CAPTURE TIM2_CC0 PA8
+            //transceiver::stxon //usato per attivare la trasmissione OUTPUTCOMPARE TIM2_CC1 PA9
             static Thread *tWaiting;
             static RadioTimer& instance();
             virtual ~RadioTimer();
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.cpp b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.cpp
similarity index 98%
rename from miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.cpp
rename to miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.cpp
index e73f9ec814f359fb8f4007631f12ac1cc5fa9b72..d3acec0757adbe19e35b022dd6350fadf5835150 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.cpp
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.cpp
@@ -28,7 +28,7 @@
  *   along with this program; if not, see <http://www.gnu.org/licenses/>   *
  ***************************************************************************/
 
-#include "hardware_timer.h"
+#include "rtc.h"
 #include <miosix.h>
 #include <kernel/scheduler/scheduler.h>
 #include "gpioirq.h"
@@ -78,7 +78,7 @@ static WaitResult waitImpl(long long value, bool eventSensitive)
     while(RTC->SYNCBUSY & RTC_SYNCBUSY_COMP0) ;
     
     FastInterruptDisableLock dLock;
-    //NOTE: this is very important, enabling the interrpt without clearing the
+    //NOTE: this is very important, enabling the interrupt without clearing the
     //interrupt flag causes the function to return prematurely, sometimes
     RTC->IFC=RTC_IFC_COMP0;
     RTC->IEN |= RTC_IEN_COMP0;
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.h b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.h
similarity index 64%
rename from miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.h
rename to miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.h
index baeaa866bf19f158b0b74805cb893c23d82cd41d..81191d510b5b8f0eb5cc69532dc994a122ada598 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/hardware_timer.h
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/rtc.h
@@ -31,105 +31,11 @@
 #ifndef TIMER_H
 #define TIMER_H
 
+#include "timer_interface.h"
 #include <kernel/timeconversion.h>
 
 namespace miosix {
 
-/**
- * Pure virtual class defining the HardwareTimer interface.
- * This interface includes support for an input capture module, used by the
- * Transceiver driver to timestamp packet reception, and an output compare
- * module, used again by the Transceiver to send packets deterministically.
- */
-class HardwareTimer
-{
-public:
-    /**
-     * \return the timer counter value in ticks
-     */
-    virtual long long getValue() const=0;
-    
-    /**
-     * Put thread in wait for the specified relative time.
-     * This function wait for a relative time passed as parameter.
-     * \param value relative time to wait, expressed in ticks
-     */
-    virtual void wait(long long value)=0;
-    
-    /**
-     * Puts the thread in wait for the specified absolute time.
-     * \param value absolute wait time in ticks
-     * If value of absolute time is in the past no waiting will be set
-     * and function return immediately.
-     * \return true if the wait time was in the past
-     */
-    virtual bool absoluteWait(long long value)=0;
-    
-    /**
-     * Set the timer interrupt to occur at an absolute value and put the 
-     * thread in wait of this. 
-     * When the timer interrupt will occur, the associated GPIO passes 
-     * from a low logic level to a high logic level for few us.
-     * \param value absolute value when the interrupt will occur, expressed in 
-     * ticks
-     * If value of absolute time is in the past no waiting will be set
-     * and function return immediately. In this case, the GPIO will not be
-     * pulsed
-     * \return true if the wait time was in the past, in this case the GPIO
-     * has not been pulsed
-     */
-    virtual bool absoluteWaitTrigger(long long value)=0;
-    
-    /**
-     * Put thread in waiting of timeout or extern event.
-     * \param value timeout expressed in ticks
-     * \return true in case of timeout
-     */
-    virtual bool waitTimeoutOrEvent(long long value)=0;
-    
-    /**
-     * Put thread in waiting of timeout or extern event.
-     * \param value absolute timeout expressed in ticks
-     * If value of absolute time is in the past no waiting will be set
-     * and function return immediately.
-     * \return true in case of timeout, or if the wait time is in the past.
-     * In the corner case where both the timeout and the event are in the past,
-     * return false.
-     */
-    virtual bool absoluteWaitTimeoutOrEvent(long long value)=0;
-    
-    /**
-     * \return the precise time in ticks when the IRQ signal of the event was
-     * asserted
-     */
-    virtual long long getExtEventTimestamp() const=0;
-    
-    /**
-     * Althought the interface to the timer is in ticks to be able to do
-     * computations that are exact and use the timer resolution fully,
-     * these member functions are provided to convert to nanoseconds
-     * 
-     * \param tick time point in timer ticks
-     * \return the equivalent time point in the nanosecond timescale
-     */
-    virtual long long tick2ns(long long tick)=0;
-
-    /**
-     * Althought the interface to the timer is in ticks to be able to do
-     * computations that are exact and use the timer resolution fully,
-     * these member functions are provided to convert to nanoseconds
-     * 
-     * \param ns time point in nanoseconds
-     * \return the equivalent time point in the timer tick timescale
-     */
-    virtual long long ns2tick(long long ns)=0;
-    
-    /**
-     * \return the timer frequency in Hz
-     */
-    virtual unsigned int getTickFrequency() const=0;
-};
-
 /**
  * Manages the hardware timer that runs also in low power mode.
  * This class is not safe to be accessed by multiple threads simultaneously.
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer.h b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer_interface.h
similarity index 97%
rename from miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer.h
rename to miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer_interface.h
index 378a7a9174b685d15ec733634630fff3018ef4a9..b18346808705c80925d61da1879b2ad51c6f61f6 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer.h
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/timer_interface.h
@@ -11,8 +11,8 @@
  * Created on October 17, 2016, 10:27 AM
  */
 
-#ifndef TIMER_H
-#define TIMER_H
+#ifndef TIMERINTERFACE_H
+#define TIMERINTERFACE_H
 
 #include <kernel/timeconversion.h>
 
@@ -24,7 +24,7 @@ namespace miosix {
  * Transceiver driver to timestamp packet reception, and an output compare
  * module, used again by the Transceiver to send packets deterministically.
  */
-    class TimerInterface{
+    class HardwareTimer{
     public:
         /**
          * \return the timer counter value in ticks
@@ -113,7 +113,5 @@ namespace miosix {
     };
 }
 
-
-
-#endif /* TIMER_H */
+#endif /* TIMERINTERFACE_H */
 
diff --git a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/transceiver.h b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/transceiver.h
index 5fb8f7a0e188e920675b302d6b722a3a068c03c2..a77bafea4ae61781e120707ff68d0d54fc687d3e 100644
--- a/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/transceiver.h
+++ b/miosix/arch/cortexM3_efm32gg/efm32gg332f1024_wandstem/interfaces-impl/transceiver.h
@@ -33,7 +33,7 @@
 #include <limits>
 #include "power_manager.h"
 #include "spi.h"
-#include "hardware_timer.h"
+#include "rtc.h"
 
 namespace miosix {
 
diff --git a/miosix/config/Makefile.inc b/miosix/config/Makefile.inc
index 2ade3acd6e3b324437274cd5277166ae12d4cb0f..b7bcef2780c6e16ce99d9a0bbd84f749d0bdf401 100644
--- a/miosix/config/Makefile.inc
+++ b/miosix/config/Makefile.inc
@@ -59,7 +59,7 @@
 ## size and speed
 ##
 #OPT_OPTIMIZATION := -O0
-OPT_OPTIMIZATION := -O2
+#OPT_OPTIMIZATION := -O2
 #OPT_OPTIMIZATION := -O3
 #OPT_OPTIMIZATION := -Os
 
@@ -2112,7 +2112,7 @@ else ifeq ($(ARCH),cortexM3_efm32gg)
         $(BOARD_INC)/interfaces-impl/power_manager.cpp  \
         $(BOARD_INC)/interfaces-impl/high_resolution_timer_base.cpp \
         $(BOARD_INC)/interfaces-impl/gpioirq.cpp        \
-        $(BOARD_INC)/interfaces-impl/hardware_timer.cpp \
+        $(BOARD_INC)/interfaces-impl/rtc.cpp \
         $(BOARD_INC)/interfaces-impl/transceiver.cpp    \
         $(BOARD_INC)/interfaces-impl/cstimer.cpp        \
         $(BOARD_INC)/interfaces-impl/gpio_timer.cpp     \
diff --git a/miosix/interfaces/cstimer.h b/miosix/interfaces/cstimer.h
index 1befa418f6ad42e2993d2dbd93a4d96abb4c6776..958816b8aa49544d1ce171626635d57db3422531 100644
--- a/miosix/interfaces/cstimer.h
+++ b/miosix/interfaces/cstimer.h
@@ -27,7 +27,7 @@ public:
      * Can be called with interrupts disabled or within an interrupt.
      * \param tick the time when the interrupt will be fired, in nanoseconds
      */
-    void IRQsetNextInterrupt(long long tick);
+    void IRQsetNextInterrupt(long long ns);
     
     /**
      * \return the time when the next interrupt will be fired.
@@ -73,4 +73,4 @@ private:
 
 } //namespace miosix
 
-#endif //TIMER_H
+#endif //CSTIMER_H