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

73 Commits

Author SHA1 Message Date
Marian Buschsieweke
040bad0425
cpu/atmega_common: increase stack size with xtimer
If a timer triggers while the idle thread is running, previously a stack
overflow was triggered. This commit increases the idle threads stack size if
xtimer is used.
2020-07-27 16:52:36 +02:00
benpicco
8a2b089cd5
Merge pull request #14098 from maribu/atmega-timer
cpu/atmega_common: Fix periph_timer
2020-05-28 13:23:22 +02:00
Marian Buschsieweke
99bd1c318c
cpu/atmega_common/periph_timer: Add timer_set
Added a low level implementation of timer_set() that allows setting relative
timeouts as short as 0. This results in tests/periph_timer_short_relative_set
no passing.
2020-05-28 11:46:02 +02:00
Marian Buschsieweke
9e566370bf
cpu/atmega_common: Fixed irq_arch implementation
The inline assembly implementation was badly in need of improvement.

- irq_disable() took 2 CPU cycles more than needed
    - The current interrupt state was stored in a temporary register and
      afterwards copied to the target register, rather than storing it in the
      target register right away
    - The lower bits of the state were cleared (as they have no meaning for the
      interrupt status), but the API purposely never required such things from
      implementations.
- irq_restore() took 5 CPU cycles. This was reduced to 3 CPU cycles (or 2 CPU
  cycles in the best case)
2020-05-26 15:19:14 +02:00
Marian Buschsieweke
ba5844098d
cpu/atmega_common: Make irq_arch inline-able
- Moved irq_arch.c to irq_arch.h and marked all functions as
  `__attribute__((always_inline)) static inline`
2020-05-17 18:41:11 +02:00
Marian Buschsieweke
4d1a5b9256
cpu/atmega_common: Drop legacy include
Drop `#include "irq.h"` in `cpu.h`, which was there for a legacy work around.
A bunch of missing includes of `irq.h` materialized due to this and were
fixed.
2020-05-15 11:24:28 +02:00
84745365fd cpu: atmega_common: make THREAD_STACKSIZE_IDLE configurable 2020-03-12 13:01:13 +01:00
Marian Buschsieweke
1879f58512
cpu/atmega_common: Cleanup state flags
- Use one byte of RAM to track both IRQ and UART TX state
- Fix incorrect use of volatile
2020-02-06 15:41:41 +01:00
Sebastian Meiling
91cff05a15 doc: use @name for doxygen groups 2020-01-28 15:46:09 +01:00
Sebastian Meiling
2eae1952f7 doc: fix doxygen groups for atmega cpus 2020-01-28 15:44:29 +01:00
chudov
efa9bb88a2 cpu/atmega256rfr2: symbol counter based RTT support 2019-12-05 22:53:05 +01:00
Matthew Blue
fb211c7c0c cpu/atmega_common: initial RTT support 2019-12-01 17:26:24 +01:00
41e29e3fda
Merge pull request #12790 from maribu/atmega_isr_thread
cpu/atmega_common
2019-11-24 11:10:10 +01:00
Marian Buschsieweke
606d72f64b
cpu/atmega_common: Clean up & fix IRQ handling
At the end of an ISR, the ATmega code was doing an `thread_yield()` instead of
 a `thread_yield_higher()`. This resulted in tests/isr_yield_higher failing.
 Fixing this saves a few lines of code, some ROM, and solves the issue.
2019-11-23 11:57:11 +01:00
Marian Buschsieweke
2b1bee750a
cpu/atmega_common: Stop using reserved names
Names with two leading underscores are reserved in any context of the c
 standard, and thus must not be used. This ATmega platform used it however for
 defining internal stuff. This commit fixes this.
2019-11-23 11:56:11 +01:00
benpicco
09f647eee2
Merge pull request #12693 from maribu/neopixel-atmega
drivers: Added WS281x RGB LED driver for ATmega platform
2019-11-22 22:36:36 +01:00
Yegor Yefremov
cf65070b06 doxygen/GPIO: don't include overridden typedefs
Add missing #ifndefs to overridden GPIO typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
fa3b0ff04b doxygen/SPI: don't include overridden typedefs
Add missing #ifndefs to overridden SPI typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Marian Buschsieweke
ba26aed107
cpu/atmega_common: Restructured code
Moved macros and static inline helper functions needed to access ATmega GPIOs
to cpu/atmega_common/include/atmega_gpio.h in order to reuse them for the
platform specific low level part of the Neopixel driver.
2019-11-12 20:15:59 +01:00
Benjamin Valentin
5b6d56efd5 atmega_common: provide CPU ID for every device
ATmega128RFA1/ATmega256RFR2 do not have a unique CPU ID.

Use the RC oscillator callibration byte as an impromptu CPU ID and rely
on bootlader constants present on all ATmega families for the remaining
bytes.

This way we can provide a faux CPU ID on all ATmega MCUs and typical hobbyists
with no access to JTAG adapters or high voltage programmer capable of writing
the user signature have a good chance that the CPU IDs of their device do not collide.
2019-11-08 16:58:03 +01:00
d22404b8b7
cpu/atmega_common: add implementation for watchdog 2019-11-07 11:35:29 +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
Gunar Schorcht
4b009649c6 cpu/atmega_common: changes for common heap command 2019-09-05 09:20:55 +02:00
Thomas Perrot
44803ea4fd
cpu/atmega32u4: add support for ATmega32U4 2019-05-24 15:12:47 +02:00
Sebastian Meiling
0edf76d362
Merge pull request #9984 from kaspar030/refactor_atmega_libc
cpu/atmega_common: refactor AVR libc code into module
2019-01-22 08:41:37 +01:00
7313525035 atmega_common: refactor avr-libc-extra into avr_libc_extra module 2019-01-21 14:37:08 +01:00
c97bedcd8b cpu/atmega_common: define eeprom clear byte value 2018-12-04 11:24:57 +01:00
Victor Arino
2ebb187ca9 cpu/atmega-common: PWM implementation
Implementation of PWM with 8-bit timers
2018-11-28 16:00:54 +01:00
Victor Arino
01420152de cpu/atmega-common: add maps for 8-bit timers 2018-11-28 15:58:58 +01:00
PeterKietzmann
8d11ca417f cpu/atmega_common: add mega2560 puf_sram feature 2018-11-20 09:45:32 +01:00
Francisco Acosta
4f28407af8 cpu/atmega_common: use the same cpu_conf for all atmega based boards
Removes redundancy of code since all the boards were defining
the same variables. Moreover, the stack sizes are unified per
architecture, as required.
2018-11-02 16:23:48 +01:00
Laurent Navet
c7fed1526c cpu/atmega_common: adapt to new i2c api
Rework atmega i2c to match new i2c interface.
Only i2c_read_bytes and i2c_write_bytes are implemented.
2018-07-25 12:01:39 +02:00
Francisco Acosta
23d176f46b
Merge pull request #8857 from ZetaR60/RIOT_atmega_time_dot_h
cpu/atmega_common: Use updated time.h
2018-06-28 22:29:20 +02:00
Josarn
fe92771372 cpu/atmega_common/include/cpu.h: uncrustified 2018-06-14 21:47:33 +02:00
Josarn
9b631170cb cpu/atmega_common: uncrustified 2018-06-14 21:47:33 +02:00
Josarn
80b02e5268 cpu/atmega_common: exit_isr thread_yield 2018-06-14 21:47:33 +02:00
Matthew Blue
dfa8fb919d sys/timex: fix incompatible atmega time.h 2018-05-28 13:04:55 -04:00
Matthew Blue
442634728f cpu/atmega_common: add struct timespec to time.h 2018-05-28 13:04:55 -04:00
Matthew Blue
b597700a67 cpu/atmega_common: ignore format of avr-libc in CI 2018-05-28 13:04:55 -04:00
Matthew Blue
2a92d480ea cpu/atmega_common: Use updated time.h from avr-libc-2.0.0 2018-05-28 13:04:55 -04:00
3f1657ffbb
Merge pull request #8952 from ZetaR60/RIOT_atmega_graceful_clock
boards/common/atmega: gracefully handle CKDIV8 fuse
2018-05-14 16:11:17 +02:00
Matthew Blue
2979626ef6 boards/common/atmega: gracefully handle CKDIV8 fuse 2018-05-02 14:05:33 -04:00
Matthew Blue
ac2b643308 cpu/atmega_common: return to non-interrupt context swaps 2018-04-27 14:13:34 -04:00
2866a26a24
Merge pull request #8808 from Josar/atmega_stackPointer
cpu/atmega_common: use __temp_reg__
2018-04-09 12:05:29 +02:00
391cc83881 cpu/atmega_common: provide common stdio initialization 2018-04-03 14:18:32 +02:00
Josarn
2ef1001ec7 cpu/atmega_common: use __temp_reg__ 2018-03-30 10:22:32 +02:00
Josarn
d82f1eba4c atmega: add last instruction print
Signed-off-by: Josua Arndt  <josuaarndt@live.de>
2018-03-06 14:57:18 +01:00
lebrush
c054e38156 Merge pull request #7590 from lebrush/fix/atmega-gpio-misc
GPIO interrupt fixes for atmega328p
2017-09-15 11:59:11 +02:00
Victor Arino
294594908a cpu/atmega_common: support for flank low 2017-09-14 20:40:13 +02:00
Robert Hartung
914025973d cpu/atmega: use power.h defines instead of direct register access 2017-09-14 14:04:14 +02:00