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

33 Commits

Author SHA1 Message Date
Marian Buschsieweke
e5d0f83696
cpu/atmega_common: store periph_timer prescalers in flash 2023-02-27 12:06:30 +01:00
Marian Buschsieweke
787884aa95
cpu/atmega_common/periph_timer: fix spurious IRQs 2022-11-25 14:46:16 +01: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
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
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
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Benjamin Valentin
96273b4df0 cpu/atmega_common: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
benpicco
49aef1b678
Merge pull request #13902 from benpicco/periph_timer_periodic
periph/timer: add timer_set_periodic()
2020-05-28 18:03:32 +02:00
Benjamin Valentin
c000a77658 cpu/atmega_common: implement timer_set_periodic() 2020-05-28 17:37:42 +02:00
benpicco
2183fb9273
Merge pull request #14155 from maribu/atmega_timer_cleanup
cpu/atmega*: Clean up timer configs
2020-05-28 17:33:31 +02:00
Marian Buschsieweke
fb722b1be7
cpu/atmega_common/periph_timer: Fix style 2020-05-28 16:27:08 +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
067a9c38ae
cpu/atmega_common: Fix race in periph_timer
As AVR is an 8 bit platform, special care needs to be taken when accessing 16
bit registers in an atomic fashion. This commit as just this care.
2020-05-18 21:22:31 +02: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
Sebastian Meiling
1d24709674 cpu/atmega_common: adapt timer to return 0 on success
Adapt periph/timer implementation of atmega based MCUs
to return 0 on success for all functions.
2019-09-11 13:41:44 +02:00
smlng
262a04c9cf atmega: fix periph timer configuration
- correct number of timers for atmega328p from 2 to 1
- correct number of timer channels for atmega328p from 3 to 2
- adapt atmega periph timer implementation accordingly
2018-11-29 09:30:44 +01:00
Josarn
d6c0398f3d atmega timer: Interrupt Pin
A debug pin can be used to probe timer interrupts with an oscilloscope or
 other time measurement equipment. Thus, determine when an interrupt occurs
 and how long the timer ISR takes.
 The pin should be defined in the makefile as follows:

CFLAGS += -DDEBUG_TIMER_PORT=PORTF -DDEBUG_TIMER_DDR=DDRF \
            -DDEBUG_TIMER_PIN=PORTF4
2018-07-18 20:48:17 +02:00
Josarn
0e491861af cpu/atmega_common/periph/timer.c: 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
Francisco Acosta
8ab908146e
Merge pull request #8959 from aabadie/pr/cpu/guard_atmega_common
cpu/atmega_common: remove useless periph file guard
2018-05-22 19:57:46 +02:00
Matthew Blue
ac2b643308 cpu/atmega_common: return to non-interrupt context swaps 2018-04-27 14:13:34 -04:00
1195ee609f cpu/atmega_common: remove useless periph file guard 2018-04-16 09:58:44 +02:00
Matthew Blue
d3dc49e2ab cpu/atmega_common: Support for ATmega1284P 2018-03-25 14:24:40 -04:00
Francisco Acosta
f2efd88f98 Merge pull request #7129 from haukepetersen/opt_periph_sharetimerset
cpu: add and use shared code for timer_set()
2017-08-01 15:09:48 +02:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Hauke Petersen
a1499f4190 cpu: add and use shared code for timer_set() 2017-06-02 12:21:56 +02:00
Oleg Hahm
d0316fa7ae periph timer: remove timer_irq_(en|dis)able 2017-01-14 15:34:53 +01:00
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.
2016-09-10 00:12:39 +02:00
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.
2016-08-20 12:23:48 +02:00
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.
2016-07-08 10:52:22 -05:00
kYc0o
17c78e70e2 cpu/atmega_common: add common atmega CPU code to atmega_common 2016-06-22 14:25:10 +02:00