contiki/cpu/cc2538/dev
Benoît Thébaudeau 5261bb861d cc2538: lpm: Fix RTIMER_NOW() upon wake-up
When returning from PM1/2, the sleep timer value (used by RTIMER_NOW()) is not
up-to-date until a positive edge on the 32-kHz clock has been detected after the
system clock restarted. To ensure an updated value is read, wait for a positive
transition on the 32-kHz clock by polling the SYS_CTRL_CLOCK_STA.SYNC_32K bit,
before reading the sleep timer value.

Because of this RTIMER_NOW() fixup, lpm_exit() has to be called at the very
beginning of ISRs waking up the SoC. This also ensures that all clocks and
timers are enabled at the correct frequency and updated before using them
following wake-up.

Without this fix, etimers could sometimes (randomly, depending on timings)
become ultra slow (observed from 10x to 40x slower than normal) if the system
exited PM1/2 very often. This issue occurred more often with PM1.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 20:23:29 +01:00
..
ana-regs.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
cc2538-rf.c Added a function for setting promiscous mode on the CC2538 RF core 2013-11-23 15:05:15 +01:00
cc2538-rf.h Added missing argument declaration 2013-11-23 15:05:16 +01:00
flash-cca.h cc2538: Add header file for flash CCA page and use it 2013-12-05 18:45:51 +01:00
gpio.c cc2538: lpm: Fix RTIMER_NOW() upon wake-up 2013-12-05 20:23:29 +01:00
gpio.h cc2538: gpio: Add macros to use GPIO power-up interrupts 2013-11-26 22:10:47 +01:00
gptimer.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
ioc.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
ioc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
mpu.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
nvic.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
nvic.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
random.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-ffsm.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-sfr.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore-xreg.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rfcore.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
rom-util.h cc2538: Add driver for the rom utility function library 2013-11-18 12:38:06 +01:00
scb.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
smwdthrosc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
soc-adc.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
spi.c cc2538: Clean up port and pin definitions 2013-11-25 15:00:41 +01:00
ssi.h Added SPI driver for CC2538 2013-09-27 17:46:15 -04:00
sys-ctrl.c cc2538: sys_ctrl: Make it possible to use the 32-kHz crystal 2013-11-15 15:52:10 +01:00
sys-ctrl.h cc2538: sys_ctrl: Make it possible to use the 32-kHz crystal 2013-11-15 15:52:10 +01:00
systick.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
uart1.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
uart.c cc2538: Clean up port and pin definitions 2013-11-25 15:00:41 +01:00
uart.h Make the CC2538 UART driver more configurable 2013-08-09 12:20:25 +01:00
udma.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
udma.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
usb-regs.h New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00
watchdog.c New Platform: TI CC2538 Development Kit 2013-04-06 21:07:31 +01:00