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

35 Commits

Author SHA1 Message Date
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02: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
Francisco Molina
8ed8daa493
cpu/cc2538/timer: fix 32 bit timer reload value
The interval load value was only set to 0xffff regardless of the counter
mode used which mad the 32bit timer apparently stop after 0xffff (it
would never reach values >0xffff).

When a GPTM is configured to one of the 32-bit modes, TAILR appears as a
32-bit register (the upper 16-bits correspond to the contents of the
GPTM Timer B Interval Load (TBILR) register). In a 16-bit mode, the
upper 16 bits of this register read as 0s and have no effect on the
state of TBILR.

Thsi commit set the correct value for TAILR depending on the configured
timer mode.
2020-08-12 11:35:42 +02:00
Francisco Molina
dcd6b7f226
cpu/cc2538/timer: fix GPT enabling wait 2020-03-25 20:16:23 +01:00
Francisco Molina
0cc6a51ea8
cpu/cc2538/periph/timer: cleanup styling 2020-03-23 10:59:53 +01:00
Francisco Molina
7e913fe0d9
cpu/cc2538/periph/timer: set pending timer_set_absolute
GPT timer needs to be gated to write to TnMATCHR register. If set
when timer is stopped save values and set on next timer_start()
2020-03-23 10:59:30 +01:00
Francisco Molina
ce696c6caa
cpu/cc2538/timer: enable GPT clock in active, sleep and PM0 2020-03-23 10:58:56 +01:00
Francisco Molina
226e1b5daf
cpu/cc2538: fix GPT3 timer IRQ definition 2020-03-19 16:31:57 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Sebastian Meiling
cabaaebff4 cpu/cc2538: adapt timer to return 0 on success
Adapt periph/timer implementation of cc2538 based MCUs
to return 0 on success for all functions.
2019-09-11 13:44:46 +02:00
smlng
7ff2e44821 cpu/cc2538: cleanup periph timer headers and code
Remove unused or obsolete defines in headers, due to usage of
    vendor headers. Also remove register bit definition in timer
    struct because they where not used in the implementation.
2018-08-07 08:13:47 +02:00
smlng
b7ab6b4b36 cpu/cc2538: cleanup periph timer implementation
Refine periph timer implementation to use vendor header defines
    where possible, remove unnecessary structs and general cleanup.
2018-08-07 08:13:47 +02:00
4dd854da74 cpu/cc2538: DEBUG fixes 2018-01-15 14:37:05 +01:00
smlng
e381317fbf make: fix sign-compare errors
cpu, nrf5x_common: fix sign-compare in periph/flashpage
    drivers, periph_common: fix sign-compare in flashpage
    cpu, sam0_common: fix sign-compare error in periph/gpio
    cpu, cc2538: fix sign-compare in periph/timer
    cpu, sam3: fix sign-compare in periph/gpio
    cpu, stm32_common: fix sign-compare in periph/pwm
    cpu, stm32_common: fix sign-compare in periph/timer
    cpu, stm32_common: fix sign-compare in periph/flashpage
    cpu, nrf5x_common: fix sign-compare in radio/nrfmin
    cpu, samd21: fix sign-compare in periph/pwm
    cpu, ezr32wg: fix sign-compare in periph/gpio
    cpu, ezr32wg: fix sign-compare in periph/timer
    drivers, ethos: fix sign-compare
    sys, net: fix sign-compare
    cpu, atmega_common: fix sign-compare error
    cpu, msp430fxyz: fix sign-compare in periph/gpio
    boards, msb-430-common: fix sign-compare in board_init
    driver, cc2420: fix sign-compared
    sys/net: fix sign-compare in gnrc_tftp
    driver, pcd8544: fix sign-compare
    driver, pn532: fix sign-compare
    driver, sdcard_spi: fix sign-compare
    tests: fix sign_compare
    sys/net, lwmac: fix sign_compare
    pkg, lwip: fix sign-compare
    boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
    tests, sock_ip: fix sign compare
    tests, msg_avail: fix sign compare
    tests, sock_udp: fix sign compare
    boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
smlng
12868d2416 cpu, cc2538: cleanup periph/timer 2017-08-28 21:43:12 +02: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
smlng
e0f19f3394 cc2538: fix timer_set for channel B 2017-03-02 14:49:16 +01:00
Oleg Hahm
d0316fa7ae periph timer: remove timer_irq_(en|dis)able 2017-01-14 15:34:53 +01:00
Hauke Petersen
3a00fe8e49 cpus: make use of cortexm_isr_end() 2016-12-21 11:28:46 +01:00
Ian Martin
abae801105 cpu/cc2538/periph/timer overhaul. support 16-bit and 32-bit modes 2016-08-16 15:07:26 -04:00
Ian Martin
b6fbdb2f79 Avoid rounding errors during frequency scaling. 2016-03-01 15:18:45 -05:00
Ian Martin
4176d04b02 cpu/cc2538/periph/timer overhaul
* Use the 32-bit counter mode.
 * Apply frequency scaling for non-16 MHz frequencies.
2016-03-01 15:15:16 -05:00
Hauke Petersen
b11a3ad74b cpus: adapted timer implementations to API changes 2016-02-29 14:45:00 +01:00
Joakim Nohlgård
943c106461 cpu/cc2538: Update to match timer_init API change 2016-02-13 21:29:36 +01:00
Oleg Hahm
4780b5cba1 cc2538: fix pedantic compiler warnings 2015-12-07 20:28:53 +01:00
Joakim Nohlgård
cbaeccdb90 periph/timer: Drop timer_reset 2015-10-17 20:11:03 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Hauke Petersen
e7fbaf3815 cpu: removed NAKED attribute from ISRs
- removed the __attribute__((naked)) from ISRs
- removed ISR_ENTER() and ISR_EXIT() macros

Rationale: Cortex-Mx MCUs save registers R0-R4 automatically
on calling ISRs. The naked attribute tells the compiler not
to save any other registers. This is fine, as long as the
code in the ISR is not nested. If nested, it will use also
R4 and R5, which will then lead to currupted registers on
exit of the ISR. Removing the naked will fix this.
2014-10-30 19:33:32 +01:00
Hauke Petersen
9051c7be4b Merge pull request #1861 from haukepetersen/fix_cc2538_irqvector
cpu/cc2538: cleaned up IRQ vector definition
2014-10-24 14:40:10 +02:00
Hauke Petersen
ca20603d54 cpu/cc2538: made ISR names configurable by a board 2014-10-24 14:00:53 +02:00
Hauke Petersen
ccd601b429 cpu/cc2538: centralized all cpu specific includes
- added all CPU specific includes to cpu-conf.h
- removed now not needed includes from cpu .c files
2014-10-23 14:04:57 +02:00
Ian Martin
0605a7eb95 Add support for the Texas Instruments CC2538 ARM Cortex-M3 MCU and developer kit. 2014-10-13 09:29:49 -04:00