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

299 Commits

Author SHA1 Message Date
chudov
c52f6e71c2 drivers/at86rf2xx: rx timestamp generation for ATmegaRFR2
Signed-off-by: chudov <chudov@gmail.com>
2023-05-19 15:33:15 +02:00
Marian Buschsieweke
4e3c0777fc
sys/flash_utils: add helpers for placing variables in flash
This adds a layer of convenience abstraction over classical Harvard
architectures (like most AVRs) that do not map the flash memory into
the data address space and modern Harvard architectures or von-Neumann
architectures that do so. The motivation is to safe a lot of RAM for
AVR by storing constant strings into flash.
2023-02-27 12:31:03 +01:00
Marian Buschsieweke
e5d0f83696
cpu/atmega_common: store periph_timer prescalers in flash 2023-02-27 12:06:30 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
Marian Buschsieweke
787884aa95
cpu/atmega_common/periph_timer: fix spurious IRQs 2022-11-25 14:46:16 +01:00
Benjamin Valentin
7abaae7bbd treewide: fix typos 2022-09-15 12:12:23 +02:00
benpicco
a1ee44e114
Merge pull request #18263 from maribu/cpu/avr8/idle_stack
cpu/{atmega_common,atxmega}: increase idle thread stack size
2022-06-29 00:57:57 +02:00
Marian Buschsieweke
b72cafb169
cpu/atmega_common: Fix atmega_port_addr()
In 04ab5a74f3 a bug was introduced in
the calculation of the GPIO port address by refactoring code. This
fixes the issue by extracting the GPIO port first from the pin.
2022-06-27 22:15:52 +02:00
Marian Buschsieweke
8cc0199437
cpu/{atmega_common,atxmega}: increase idle thread stack size
Our AVR port doesn't make use of an ISR stack and just victimizes the
stack of whatever thread happens to be running, which in most cases is
the idle thread. Hence, the idle stack has to be large enough to
support the ztimer ISR.
2022-06-27 14:39:57 +02:00
Marian Buschsieweke
bae91c1660
Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped
drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag
2022-05-03 12:06:37 +02:00
Marian Buschsieweke
04ab5a74f3
cpu/atmega_common: implement periph/gpio_ll{,_irq}
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2022-05-02 14:44:55 +02:00
Benjamin Valentin
4540e490e3 cpu/atmega_common: timer: implement TIM_FLAG_SET_STOPPED 2022-04-28 13:27:59 +02:00
Niels Gandraß
41e8a57960
cpu/atmega_common: Remember CTC mode with timer_periodic 2021-12-13 12:08:38 +01:00
b7e9d4fad2 cpu/atmega_common: also enlarge idle stack for ztimer64 2021-12-08 13:49:25 +01:00
Gunar Schorcht
007e29ebb5 cpu/periph/i2c: update implementations to new I2C API
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
Leandro Lanzieri
845681448d
cpu/atmega_common: move PCINT documentation from boards 2021-11-22 12:25:57 +01:00
Leandro Lanzieri
b8e2e3ce66
cpu/atmega_common: model Kconfig 2021-11-22 12:25:29 +01:00
Marian Buschsieweke
d91c9cdc5a
cpu/atmega_common: make cppcheck happy 2021-11-16 16:20:26 +01:00
Marian Buschsieweke
35a1b60068
cpu/{atxmega,atmega_common}: fix invalid use of PSTR()
core_panic() doesn't expect the message to be in program memory, but
in data memory. Bad things will happen on AVR when the address is
interpreted as being in data address space, but the allocation is
done in program address space.
2021-09-30 17:15:39 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Benjamin Valentin
87f7e5a963 cpu/atmega_common: move clock init to common code
This code should not be in the realm of the board config, but in
common arch code.
2021-08-27 17:06:50 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
benpicco
619a444741
Merge pull request #16347 from benpicco/drivers/rtt_rtc-rtc_get_time_ms
drivers/rtt_rtc: implement rtc_get_time_ms()
2021-05-05 19:13:21 +02:00
Benjamin Valentin
7c1b5630d2 cpu/atmega_common: RTC: implement rtc_get_time_ms() 2021-05-04 23:17:05 +02:00
Benjamin Valentin
5ea85ca433 cpu/atmega_common: RTC: get rid of isr_flag 2021-05-04 23:14:35 +02:00
Benjamin Valentin
2d706b3295 cpu/atmega_common: RTC: fix off-by-one normalisation 2021-05-04 17:56:13 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Marian Buschsieweke
5cc62437da
cpu/avr8_common: move ldscripts from atmega_common
The ldscripts are already used for both ATmega and ATxmega, so it
makes sense to have them in the common folder.
2021-03-30 10:50:09 +02:00
Gerson Fernando Budke
70c597620f cpu/avr8_common: Differentiate avr8 cpu cores
Current there is no way to split code between ATmega and ATxmega in
drivers.  This differentiate AVR8 cores into MEGAs and XMEGAs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Francisco
fc82e3916e
Merge pull request #15931 from haukepetersen/add_dbgpin3
sys: add `dbgpin` module for debugging and profiling (take 2)
2021-03-09 10:26:37 +01:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
Hauke Petersen
91f9d7db62 cpu/atmega_common/kconfig: add dbgpin feature 2021-02-26 11:34:52 +01:00
Hauke Petersen
71e9a9e216 cpu/atmega_common: add dbgpin initialization 2021-02-26 11:34:52 +01:00
Joakim Nohlgård
6adeec09e9 atmega_common: add arch specific XFA ldscript to properly place .roxfa 2021-02-16 14:55:26 +01:00
Gerson Fernando Budke
1426e15679 cpu/avr8_common: Normalize method prefix name
Refactor atmega_ prefix to avr8_ prefix and update copyrights.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:42 -03:00
Gerson Fernando Budke
4cbd311196 cpu: Refact atmega_common into avr8_common
Split atmega_common code into avr8_common folder.  This moves common
avr8 code to be used for all avr8 variants: tiny, mega and xmega.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:22 -03:00
Gerson Fernando Budke
a0028a9ff8 cpu/atmega_common: Split cpu.c into atmega_cpu/cpu.c
Split cpu.c file into cpu.c and atmega_cpu.c files.  This extract mega
specific code from common code.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
Gerson Fernando Budke
4d68dd5aea cpu/atmega_common: Extract clock definitions
Refactor clock definitions from cpu.h to clock.h.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
Marian Buschsieweke
4714e38911
cpu/atmega_common: drop unused module
The module cpu_atmega_common_cxx seems to be non-existing and not used. It is
unclear whether this slipped in by accident or if this was actually useful at
some point in time. In any case, the module is not present (anymore) and cannot
be used, so let's clean up the Makefile.
2021-01-06 20:46:56 +01:00
Marian Buschsieweke
902aa29b62
sys/malloc_thread_safe: split out of cpu/atmega_common
Split out Gunar Schorcht's clever approach to provide thread safe malloc for
AVR into a system module and make AVR depend on this. This allows other
platforms to also use this.
2020-12-17 15:39:05 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier 2020-11-24 14:00:52 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
Marian Buschsieweke
a892c1aa23
cpu/atmega_common: Add atomic_utils_arch.h 2020-11-10 10:55:14 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
fb61443bbd cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Leandro Lanzieri
fe6d66d92a
kconfig: add ERROR symbol for conflicting modules 2020-10-09 18:04:17 +02:00