1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Francisco Molina
9a2190cd24
cpu/cc2538/periph/pm: unset OSC_PD when running on 32Mhz
Setting OSC_PD before WFI allows for faster wakeup from sleep.

Wait for cc2538_sys_ctrl_clk_sta and not cc2538_sys_ctrl_clk_ctrl
to be set.
2020-03-21 19:32:24 +01:00
Benjamin Valentin
5d8c00e302 cpu/cc2538: implement periph/pm
cc2538 implements 4 sleep modes.
In the lightest mode (3) any interrupt source can wake up the CPU.
In mode 2, only RTT, GPIO or USB may wake the CPU.
In mode 1 only RTT and GPIO can wake the CPU.
In mode 0 only GPIO can wake the CPU.

In mode 0 and 1 the lower 16k RAM are lost. This is a problem since those
are usually used by RIOT.

The linkerscripts in cc2538/ldscripts take different approaches towards that.
Some only use the upper 16k and leave the other half to be managed by the
application.

`cc2538sf53.ld` which is used by `openmote-b` uses the entire RAM starting
at the lower half, so it will not be able to wake up from those modes.

A quick fix to test those modes with `tests/periph_pm` would be

--- a/cpu/cc2538/ldscripts/cc2538sf53.ld
+++ b/cpu/cc2538/ldscripts/cc2538sf53.ld
@@ -21,7 +21,7 @@ MEMORY
 {
     rom (rx)    : ORIGIN = 0x00200000, LENGTH = 512K - 44
     cca         : ORIGIN = 0x0027ffd4, LENGTH = 44
-    ram (w!rx)  : ORIGIN = 0x20000000, LENGTH = 32K
+    ram (w!rx)  : ORIGIN = 0x20004000, LENGTH = 16K
 }
2020-03-10 10:35:46 +01:00
167bd30453 all: fix my email address 2017-10-20 15:02:41 +02:00
smlng
fc5c432510 cpu, cc2538: fix pm, don't go into cortexm_sleep(0)
fixes #7746
2017-10-18 16:01:38 +02:00