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

61 Commits

Author SHA1 Message Date
Benjamin Valentin
a9d1825e2e cpu/lpc2387: implement periph/pm
Enable IDLE and Deep Powerdown mode.

IDLE is pretty straightforward - insteady of busy waiting, the CPU will
enter an idle state from which it will resume on any event.

Deep Power Down shuts off the entite system except for the battery backup
power domain.
That means the CPU will reset on resume and can be woken by e.g. RTC.

SLEEP and POWERDOWN disable the PLL and the PLL and Flash respectively.
This requires some proper wake-up handling.

Since this turned out to be a major time sink and those modes are never
currently never used in RIOT outside of tests, I left this as an exercise
for a future reader.
2019-11-22 09:11:39 +01:00
Marian Buschsieweke
314184adb5
cpu: Platform specific C11 atomics compat headers
Added headers to define platform specific sizes and types for the C11 atomics
compatibility module for C++.
2019-10-24 23:08:36 +02:00
ebf43616b7 cpu: add arch_* features 2019-10-13 21:03:41 +02:00
Benjamin Valentin
e3b0874305 cpu/lpc2387: clean up the platform
- move clock setup from boards/ to cpu/
 - reduce code duplication
2019-09-16 13:08:56 +02:00
benpicco
6f63ef42a7
Merge pull request #11920 from maribu/lpc2387
cpu/lpc2387: Cleanup
2019-09-11 10:12:26 +02:00
benpicco
410e6edf58
Merge pull request #11882 from maribu/arm7_buildsystem
cpu/arm7_common: Moved compiler flags here
2019-09-11 10:12:14 +02:00
benpicco
85798e831b
Merge pull request #11887 from maribu/arm7_thread_yield_higher
cpu/arm7_common: Fix thread_yield_higher in ISR
2019-09-11 10:11:57 +02:00
Marian Buschsieweke
7092566f1f
cpu/arm7_common: Moved compiler flags here
- Moved compiler & linker flags from boards/common/msba2 to cpu/arm7_common
- Moved dependency to newlib nano to cpu/arm7_common
- Moved config to link in cpu/startup.o to cpu/arm7_common
2019-09-11 01:02:41 +02:00
benpicco
2101458900
Merge pull request #11911 from maribu/arm7_common-irq
cpu/arm7_common: Cleaned up IRQ code
2019-08-30 19:17:09 +02:00
Gaëtan Harter
3010d1cef4
cpu/arm7_common: remove deprecated CFLAGS_BASIC
Nothing declares this anymore
2019-08-27 17:06:52 +02:00
Marian Buschsieweke
2d415d16c9
cpu/arm7_common: Cleaned up interrupt vectors
- split up interrupt vector code from bootloader.c to vectors.c
- moved bootloader.c to arm7_init.c
- Use consistent naming:
    - use lower case for everything but preprocessor stuff
    - ISRs now named isr_foo()
2019-07-25 22:41:08 +02:00
Marian Buschsieweke
952e4a968b
cpu/arm7_common: Removed dead code
- Functions bl_uart_init(), bl_blink(), bl_config_init() declared but never
  implemented
    --> Removed declarations
- Check for c preprocessor macro CPU_MC1322X is obsolete, as CPU_MC1322X is
  nowhere defined in RIOT's code base
- IRQ_Routine() is never used, nor is it ever configured as ISR
- DEBUG_Routine() is never used, nor is it ever configured as ISR
2019-07-25 22:29:13 +02:00
Marian Buschsieweke
fd559bcdb5
cpu/arm7_common: Cleaned up IRQ code
- Moved VIC.c to irq_arch.c for consistent naming scheme
- Removed unused functions IRQenabled, disableFIQ, restoreFIQ, enableFIQ
    - There is not header for those functions, so they *cannot* be used
    - These is obviously no user, as they *cannot* be used
    - There is absolutely no documentation what they would be used for
2019-07-25 10:31:41 +02:00
Marian Buschsieweke
7f77d69694
cpu/arm7_common: Fix thread_yield_higher in ISR
thread_yield_higher() in interrupt context must not yield immediately, but at
the end of the ISR. This commit fixes the behavior.
2019-07-23 07:55:05 +02:00
Marian Buschsieweke
5f355e7210
cpu/arm7_common: Make irq_*() compiler barriers
Previously the compiler was allowed to reorder access to the interrupt control
registers in regard to memory access not marked as `volatile` (at least some
people - most notably some compiler developers - read the C standard this way).
In practise this did not happen as irq_disable(), irq_restore(), irq_enable()
are part of a separate compilation unit: Calls to external functions unknown to
the compiler are treated as if they were memory barriers. But if link time
optimization (LTO) is enabled, this no longer would work: The compiler could
inline the code accessing the interrupt control registers and reorder the memory
accesses wrapped in irq_disable() and irq_restore() outside of their protection.

This commit adds the "memory" clobber to the inline assembly accessing the
interrupt control registers. This makes those accesses explicit compiler memory
barriers. The machine code generated without LTO enabled should not differ in
any way by this commit. But the use of irq_*() should now be safe with LTO.
2019-04-24 16:29:30 +02:00
b19dcd3a65 cpu: lpc2387: use while(1){} instead of exit
This removes the dependency on newlib.
2019-01-10 12:15:44 +01:00
56f6c4f084 cpu: lpc2387: turn printf -> LOG_ERROR 2019-01-10 12:15:08 +01:00
7847a91e12 cpu: instead of cpp-style, use C-style comments 2018-02-06 16:59:58 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
942cc7598b cpu: arm7: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
167bd30453 all: fix my email address 2017-10-20 15:02:41 +02:00
Lucas Jenss
6998ffbb14 cppcheck: Provide consistent reason formatting for all cppcheck-suppresses 2017-10-10 10:25:20 -07:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Hauke Petersen
9aad0e528f cpu: cleanup unused/umimplemented isr stack code
- removed ISR_STACKSIZE define where unused (set to 0)
- removed thread_arch_isr_stack_usage(), thread_arch_isr_stack_start(),
  and/or thread_arch_isr_stack_pointer() where not implemented
2017-05-12 18:07:08 +02:00
d1db946188 Merge pull request #6344 from haukepetersen/opt_pm_misc
pm: misc cleanup and fixes
2017-01-24 14:07:36 +01:00
Oleg Hahm
3c6678b037 *: fix mismatching endifs for header guards 2017-01-19 18:30:53 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Hauke Petersen
cd53fe92e6 cpu/arm7: moved pm_reboot to periph/pm.c 2017-01-19 11:05:44 +01:00
062b90788a cpu: arm7_common: adapt to periph/pm 2017-01-12 16:26:02 +01:00
ca7bf15ac4 core: panic: adapt to pariph/pm 2017-01-12 16:26:01 +01:00
0194091673 remove obsolete lpm code 2017-01-12 11:24:15 +01:00
Hauke Petersen
ad3ed80f05 cpu/arm7_common: s/u_long/unsigned long/ 2016-12-13 13:26:37 +01:00
Joakim Nohlgård
b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
MohmadAyman
53df3e8b57 core: cpu: provide function to acquire ISR stack usage 2016-06-01 23:01:35 +02:00
c3f7186d4e unify usage of inline assembly 2016-03-31 22:23:35 +02:00
DipSwitch
5b5810ab7b Merge pull request #5109 from DipSwitch/pr/fix_core_inc_irq
core: Fix/refactor function naming in core/incude/irq.h
2016-03-22 08:12:24 +01:00
Joakim Nohlgård
1efe384d6f arm7: Use TARGET_ARCH instead of custom toolchain specification 2016-03-21 12:19:30 +01:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
938ff5c5e7 core: cpu: sys: simplify reboot() 2016-01-27 13:30:01 +01:00
Joakim Gebart
6473fa77d4 cpu/arm7_common: remove dINT/eINT definitions 2015-09-19 10:37:20 +02:00
012d82ecaf cpu: arm7_common: remove obsolete hwtimer support 2015-09-16 10:58:53 +02:00
Martine Lenders
93f555ef69 Merge pull request #3782 from OlegHahm/RIOT_assert
core: RIOT's own assert macro
2015-09-12 13:12:34 +02:00
Oleg Hahm
49917a5797 core: cpu: fix check for DEVELHELP 2015-09-12 12:43:15 +02:00
a13bc46f3e sys: remove uart0 2015-09-04 17:46:23 +02:00
Hauke Petersen
62d4981457 cpu/arm7_common: removed mc1322x code 2015-09-03 16:09:42 +02:00
a03ff202cf cpu: lpc2387: switch to newlib module 2015-08-14 16:50:41 +02:00
Joakim Gebart
70d59331b8 arm7_common: Build fixes after discovering an include guard overlap 2015-07-20 12:40:32 +02:00
Joakim Gebart
7ff26d12ea cpu/arm7_common: Rename Doxygen group to cpu_arm7_common 2015-07-20 12:40:31 +02:00
Joakim Gebart
c274558e91 cpu/arm7_common/syscalls: Fix warnings and comment style 2015-07-14 08:11:14 +02:00