1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/cpu
Jon Thacker e0365e0bf9 atmega: use software interrupt for context swap
Fixes #5745
For AVR based boards, three defines must be defined AVR_CONTEXT_SWAP_INIT,
AVR_CONTEXT_SWAP_INTERRUPT_VECT, and AVR_CONTEXT_SWAP_TRIGGER.
These defines are used to trigger a software interrupt used for context
switching.

When AVR_CONTEXT_SWAP_INTERRUPT_VECT is handled, the scheduler is run
and a context swap will happen if necessary, with the resulting thread
starting following the reti instruction. This results in threads running
at normal priority instead of at interrupt priority.

Atmega devices do provide a pure software interrupt. The method used
here for waspmote-pro and arduino-mega2560 is to use pin change
interrupts, set the pin to act as an output, and toggle the value to
simulate a software interrupt. The main limitation here is that a
physical pin is now occupied and must be defined for each board
supported by RIOT. On the plus side, it provides an easy method for
detecting context swaps with an oscilloscope.
2016-09-07 14:35:53 -05:00
..
arm7_common ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
atmega1281 boards/waspmote-pro: add support for Waspmote PRO v1.2 2016-07-05 13:05:12 +02:00
atmega2560 cpu/atmega2560/startup.c: Add __attribute__((used)) to init functions 2016-08-10 16:18:29 +02:00
atmega_common atmega: use software interrupt for context swap 2016-09-07 14:35:53 -05:00
cc26x0 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
cc430 unify usage of inline assembly 2016-03-31 22:23:35 +02:00
cc2538 Merge pull request #5725 from aeneby/tx_underrun_fix 2016-08-30 21:07:14 +02:00
cortexm_common cpu: cortexm_common: compile thread_arch.c without LTO 2016-08-29 13:30:17 +02:00
ezr32wg cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
k60 cpu: k60: rename vector.c -> vectors.c, add to SRC_NOLTO 2016-08-29 17:29:53 +02:00
k64f cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
kinetis_common cpu/kinetis_common: Add debugging messages to i2c driver 2016-08-10 19:40:39 +02:00
kw2x cpu: kw2x: rename vector.c -> vectors.c, add to SRC_NOLTO 2016-08-29 17:29:45 +02:00
lm4f120 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
lpc11u34 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
lpc1768 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
lpc2387 lpc2378: Fix wrong factor in driver poll-timer 2016-08-30 19:59:34 +02:00
msp430-common ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
msp430fxyz Merge pull request #5574 from PeterKietzmann/msp430_gpio_fix 2016-07-22 15:55:43 +02:00
native Merge pull request #5613 from OTAkeys/pr/async_read_cb_args 2016-08-05 14:17:18 +02:00
nrf5x_common doc: eliminate clutter in adc and gpio periph docs 2016-06-29 15:08:32 -04:00
nrf51 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
nrf52 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
sam3 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
sam21_common doc: eliminate clutter in adc and gpio periph docs 2016-06-29 15:08:32 -04:00
samd21 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
saml21 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
stellaris_common cpu/stellaris: revise header include guards 2016-07-05 16:38:18 +02:00
stm32_common cpu: Fix array-bounds errors with GCC 6 2016-07-13 19:23:42 +02:00
stm32f0 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
stm32f1 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
stm32f2 stm32f2: add adc and lpm 2016-07-25 10:34:57 +02:00
stm32f3 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
stm32f4 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
stm32l1 cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
x86 cpu/x86/x86_interrupts.c: Add __attribute__((used)) to isr functions 2016-08-10 16:18:29 +02:00
doc.txt fix license headers in non-.c files 2014-08-23 16:16:26 +02:00
Makefile.include.cortexm_common Revert "nrf52dk: add 6lowpan over BLE support using Nordic's softdevice" 2016-07-13 16:58:11 +02:00
Makefile.include.gnu cpu/cortexm_common: Use gcc-ar when building with LTO 2016-08-10 16:18:28 +02:00
Makefile.include.llvm cpu/Makefile.include.llvm: Try harder to find C++ and C headers from cross-GCC 2016-05-31 22:03:04 +02:00
Makefile.include.msp430_common boards: msp430-common: remove dead code when linking. 2016-08-01 18:35:21 +02:00