Commit Graph

74 Commits (0f2fa7883cf75bec70d3ade0ec8d3e00b8151a7c)

Author SHA1 Message Date
Martine Lenders 96e0ce8ed3 atmega_common: provide implementation for POSIX syscalls 6 years ago
Oleg Hahm 1660abdc70 doc: cpu: fix doxygen 6 years ago
Joakim Nohlgård 9ec001b84b atmega_common: Update unistd.h with prototypes of all POSIX defined functions and constants 6 years ago
Joakim Nohlgård 738876a98f cpu/atmega_common: Improve POSIX headers 6 years ago
Hauke Petersen ef3cdde903 cpu/atmega_common: fixed doxygen issues 6 years ago
Hauke Petersen 99c2704583 cpu/atmega: implement UART TX only 6 years ago
Anthony Merlino 23efa92cc9 cpu/atmega_common: Adds toolchain flags originally located in atmega-based boards 6 years ago
Bas Stottelaar 3b14a584b8 boards: *: remove SPI_*_EN now rework is merged 6 years ago
Hauke Petersen f5595693f6 cpu/atmega_common: adapted SPI driver 6 years ago
Oleg Hahm 7ee7801c10 *: remove trailing underscores from header guards 6 years ago
Oleg Hahm d0316fa7ae periph timer: remove timer_irq_(en|dis)able 6 years ago
Kaspar Schleiser 3e365b89fa cpu: atmega_common: adapt to periph/pm 6 years ago
Kaspar Schleiser ca7bf15ac4 core: panic: adapt to pariph/pm 6 years ago
Kaspar Schleiser 0194091673 remove obsolete lpm code 6 years ago
Jon Thacker c62803d243 atmega_common: disable interrupts prior to rebooting
If the watchdog is being reset in another thread, then
the reboot will never take place. This commit disables interrupts prior
to setting the watchdog timer to 250ms. This functionallity was common
to all Atmega CPUs, so it was moved to atmega_common.
7 years ago
Hauke Petersen 2eebf36eb2 cpu/uart: make use of named return values 7 years ago
Cenk Gündoğan 9ef148e931 cpu/atmega_common: include time.h for time_t 7 years ago
Oleg Hahm ed3aa6c46e Merge pull request #5835 from mali/timer
cpu/atmega_common: fix timer_set_absolute return code
7 years ago
Ludwig Knüpfer 6d30ced410 Merge pull request #5763 from jthacker/avr_thread_arch_isr_stack_usage
atmega: use software interrupt for context swap
7 years ago
Martine Lenders 8a74475e70 Merge pull request #5761 from mali/rmdeadcode
boards/atmega_common: remove dead code on link
7 years ago
Martine Lenders 03fbe9c2a5 Merge pull request #5766 from zhuoshuguo/fix_cpu_atmega_header_include_guards
fix cpu/atmega header include guardes.
7 years ago
Laurent Navet 4c9c3ab7d6 cpu/atmega_common: fix timer_set_absolute return code
according to timer documentation, timer_set and timer_set_absolute should
return 1 on succes, not 0.
7 years ago
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.
7 years ago
Shuguo Zhuo db3a349a51 cpu/atmega: revised header include guards. 7 years ago
kYc0o 5e3747ea8b Merge pull request #5590 from mali/atmega_common
cpu/atmega_common: improve to add smaller atmega MCUs.
7 years ago
Jon Thacker 0cc65db1b2 cpu/atmega_common: Add support for double speed baud generator
* Add support for U2X switch to double transmission speed
* Provides lower error rates when needed
* Add support for static baud rate calculation, reduces computation by 10x
* adds support for statically enabling double speed baud
7 years ago
Laurent Navet eed73beaa1 cpu/atmega_common: prepare for atmega328p inclusion
use generic avr/libc definition for conditionnal compilation.
eg: use #ifdef(PORTG) or #ifdef(TIMER_0_ISRC) instead of #ifdef(Atmega328p)
This is more generic and simplify future boards support.
7 years ago
Laurent Navet 2cd918a07a atmega_common: abstract Power Reduction Register
PR Register is PRR0 on atmega2560 and atmega1281
but PRR on atmega328p.
this abstracts as atmega Power Reduction Register as MEGA_PRR.
7 years ago
Laurent Navet 31029daaab boards/atmega_common: remove dead code on link
Don't include unused functions and data in binary.
7 years ago
kYc0o 03d380845e Merge pull request #5593 from jthacker/atmega_regs_common
cpu/atmega_common: generalize register/peripheral definitions
7 years ago
Joakim Nohlgård b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 7 years ago
Jon Thacker 2aec999900 cpu/atmega_common: generalize register/peripheral definitions
Makes AVR register definitions dependent on what avr-libc defines
for a given MCU, rather then duplicating that effort here.
Definitions done in this way are based on functionality provided,
rather than a specific MCU device.
7 years ago
kYc0o 62a9773a9c boards/waspmote-pro: add support for Waspmote PRO v1.2 7 years ago
kYc0o be70924800 cpu/atmega2560: update atmega2560 CPU code to use atmega_common code 7 years ago
kYc0o 17c78e70e2 cpu/atmega_common: add common atmega CPU code to atmega_common 7 years ago
zhuoshuguo 1cbe79a373 CPU: fix include header guards
Fix cpu/lpc2387/include/lpc2387.h
7 years ago
MohmadAyman 53df3e8b57 core: cpu: provide function to acquire ISR stack usage 7 years ago
Kaspar Schleiser c3f7186d4e unify usage of inline assembly 7 years ago
DipSwitch 5b5810ab7b Merge pull request #5109 from DipSwitch/pr/fix_core_inc_irq
core: Fix/refactor function naming in core/incude/irq.h
7 years ago
Joakim Nohlgård d0033a5d20 avr: Use TARGET_ARCH instead of custom toolchain specification 7 years ago
DipSwitch 0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 7 years ago
Kaspar Schleiser 2b010b5337 core: rename tcb_t -> thread_t, move into thread.h 7 years ago
Kaspar Schleiser 9082273746 core: header cleanup 7 years ago
Kaspar Schleiser 28d9eab420 cpu: atmega_common_ add off_t to sys/types.h 8 years ago
Kaspar Schleiser 4769c3075d cpu: avr_common: add unistd.h 8 years ago
Kaspar Schleiser effb15a2cc Merge pull request #3313 from gebart/pr/eINT-fixes
eINT/dINT fixes
8 years ago
Oleg Hahm d89ac480eb atmega: added panic function 8 years ago
Joakim Gebart 199528d3fb cpu/atmega: remove dINT/eINT definitions 8 years ago
Martine Lenders aaff370bc9 Merge pull request #3710 from authmillenon/cpu/feat/atmega-errno
atmega_common: give distinct numbers to errnos
8 years ago
Kaspar Schleiser 7fcb2b718e cpu: atmega: implement irq_arch_in 8 years ago