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

72 Commits

Author SHA1 Message Date
Joakim Nohlgård
65bb26f0b4 cpu/kinetis_common: Use gpio_init_port for PWM pin handling 2016-03-14 17:52:51 +01:00
Hauke Petersen
3990bd84e7 cpu/kinetis_common: reworked ADC driver 2016-03-14 13:06:23 +01:00
Peter Kietzmann
c8829a49b8 Merge pull request #4838 from haukepetersen/fix_periph_timerarg
drivers/timer: added callback argument
2016-03-01 08:55:54 +01:00
Hauke Petersen
b11a3ad74b cpus: adapted timer implementations to API changes 2016-02-29 14:45:00 +01:00
Hauke Petersen
34f9deecb7 cpu/kinetis_common: reworked GPIO driver 2016-02-29 11:08:45 +01:00
Joakim Nohlgård
e2f7ac78f0 Merge pull request #4040 from gebart/pr/periph-timer-init-freq
periph/timer: Change timer_init API to support arbitrary (integer) frequencies
2016-02-15 23:36:44 +01:00
Hauke Petersen
6f0179ce69 cpu/kinetis_common: adapted HWRNG implementation 2016-02-14 12:59:46 +01:00
Joakim Nohlgård
d2b06d1923 cpu/kinetis_common: Update timer_init to match API change 2016-02-13 21:29:36 +01:00
Hauke Petersen
fecf74970e cpu/kinetis_common: adapted to PWM interface changes 2016-02-12 16:10:01 +01:00
Joakim Nohlgård
3db00667b7 cpu/kinetis_common: Use a different module name to prevent linker races in Travis 2016-02-12 08:45:56 +01:00
Hauke Petersen
cfcf951b9d cpu/kinetis_common: fixed null ptr ref in gpio.c 2016-02-09 16:22:25 +01:00
Hauke Petersen
5cac36d5b3 cpu/kinetis_common: moved drivers to periph subdir 2016-02-09 16:20:03 +01:00
Hauke Petersen
975e027360 cpu: use Hauke's correct email address 2016-02-09 16:09:40 +01:00
Hauke Petersen
d80a661486 Merge pull request #4761 from haukepetersen/opt_cpuid
drivers/cpuid: fixed and unified CPUID driver implementations
2016-02-08 18:18:53 +01:00
Hauke Petersen
940097336a cpu: cleanup and unification of CPUID implementations
- moved definition of CPUID_LEN to periph_cpu.h
- fixed some doxygen
- simplyfied some implementations
2016-02-08 14:36:03 +01:00
Joakim Nohlgård
309cd5ef58 cpu/kinetis_common: Add __attribute__((used)) to flash configuration field 2016-02-08 13:07:52 +01:00
Hauke Petersen
476167a86c cpu: fixed any doxygen warning realated to 'periph' 2015-11-19 16:08:38 +01:00
Cenk Gündoğan
0792450dd7 cpu: kinetis_common: remove vtimer include from spi.c 2015-11-11 09:03:12 +01:00
Joakim Nohlgård
142c28094e kinetis_common: Refactor GPIO implementation
This is a rewrite of the Kinetis GPIO driver which follows the
refactored API in [1]. Pins are specified using the GPIO_PIN(PORT_x, y)
macro, e.g. GPIO_PIN(PORT_E, 25) for the PTE25 pin.

The interrupt pin handling is now implemented as a linked list, this
is more memory efficient, but with a minor variation in interrupt
latency depending on in what order the pins were initialized at
runtime.

Because the linked list entries are taken from a shared pool, there is
also the possibility of running out of available configuration slots,
define the preprocessor macro GPIO_INT_POOL_SIZE in periph_conf.h if
you need more than 16 pins configured for interrupts in the same
application.

[1]: https://github.com/RIOT-OS/RIOT/pull/3095
2015-10-28 14:12:19 +01:00
Hauke Petersen
c7d256d83e cpu/kinetis_common: adapted UART driver 2015-10-27 14:59:38 +01:00
Peter Kietzmann
e539db10ee Merge pull request #4104 from gebart/pr/drop-timer-reset
periph/timer: Drop timer_reset
2015-10-26 08:36:01 +01:00
Johann Fischer
f31db0431f Merge pull request #4132 from jfischer-phytec-iot/pr@kinetis-ldscript
kinetis_common: use cortexm_common ldscript
2015-10-24 09:59:38 +02:00
Johann Fischer
e95afc80fb kinetis_common: use cortexm_common ldscript
kinetis.ld includes cortexm_common ldscript, the fields for the
isr vectors and fcfield remain in kinetis.ld.
2015-10-23 12:01:22 +02:00
Johann Fischer
f0e7d2fc03 cpu/kinetis_common/timer.c: cleanup and fix the pit timer
It simplifies the virtual "count up timer" and improves
the accuracy a little. The LDVAL for the prescaler should
be set as a number of prescaler cycles-1. The virtual
up-counter should be corrected in the isr by +1
(See PIT reference manual). This also fixes a bug where
the timer is not used by xtimer and up-counter does not overflow.
2015-10-23 11:58:10 +02:00
Hauke Petersen
05ef9fee99 cpu/kinetis_common: removed i2c_init_slave() 2015-10-20 16:58:06 +02:00
Joakim Nohlgård
cbaeccdb90 periph/timer: Drop timer_reset 2015-10-17 20:11:03 +02:00
Joakim Nohlgård
015098d2c2 kinetis: timer: return error if timer channel is not zero. 2015-09-24 06:46:34 +02:00
Joakim Nohlgård
808b1abdd0 Merge pull request #3623 from gebart/pr/kinetis-timer-stop-fix
cpu/kinetis_common: periph/timer, read PIT value before stopping
2015-09-21 08:21:34 +02:00
Joakim Nohlgård
98c465008b all: Update @gebart family name, email 2015-09-20 13:47:39 +02:00
Hauke Petersen
35aaa62c38 cpu/kinetis_common: s/TIMER_DEV/TIMER_BASE/ 2015-09-17 13:57:58 +02:00
c0d3524132 cpu: kinetis_common: remove obsolete hwtimer support 2015-09-16 10:58:52 +02:00
daniel-k
7a86344c4d cpu/cortexm_common: gather addition information on hardfault 2015-08-19 14:24:54 +02:00
Joakim Gebart
cf5db434e6 cpu/kinetis_common: periph/timer, read PIT value before stopping
Reading CVAL after stopping timer seem to return zero.
Ref. manual states: "The counter period can be restarted, by first
disabling, and then enabling the timer with TCTRLn[TEN]", but does not
state whether the reset of CVAL happens on TEN 0->1 transition, or 1->0
transtion. Empirical evidence suggests the latter is the implemented behaviour.
2015-08-13 21:06:50 +02:00
Joakim Gebart
601c3002c3 cpu/kinetis_common: Cast device index enums to unsigned int before comparing for out of range values
Suppresses false warning in Clang:

    warning: comparison of constant 42 with expression of type 'xxx_t'
    is always false [-Wtautological-constant-out-of-range-compare]

See:
 - https://llvm.org/bugs/show_bug.cgi?id=16154
 - https://llvm.org/bugs/show_bug.cgi?id=22062
2015-07-21 07:21:51 +02:00
Joakim Gebart
624c241ec6 cpu/kinetis_common/spi: Fix byte_in unused.
Bug reported by the clang static analyzer.

Description: Value stored to 'byte_in' is never read
File: .../riot/cpu/kinetis_common/spi.c
Line: 1261
2015-07-13 17:24:00 +02:00
Johann Fischer
cb8ff544d5 cpu/kinetis_common/i2c.c: add _i2c_reset function, minor fixes 2015-07-09 23:19:56 +02:00
Joakim Gebart
eef8f25a44 kinetis: i2c: Handle ARBL flag in master mode.
The ARBL flag signals that bus master arbitration has been lost.
This may occur if devices on the bus misbehave, or in a multi-master
situation, or if devices are not powered and pull the SDA line down, or
if the communication wires are disconnected while communicating.
2015-07-09 23:19:55 +02:00
Joakim Gebart
cba6a81a73 kinetis: i2c: only send STOP in _i2c_stop() 2015-07-09 23:19:55 +02:00
Joakim Gebart
ed81e35e4c cpu/kinetis_common: refactor ldscripts
- Merged the two kinetis_common ldscripts into a single script.
 - Updated cpus to use the new script
 - Updated K60 to merge sram_l and sram_u into one segment
2015-07-08 19:20:00 +02:00
Hauke Petersen
253e7ce715 cpu/kinetis_common: optimization of startup code 2015-06-15 16:00:51 +02:00
Hauke Petersen
d7f659db71 cpu/kinetis_common: adjusted to changed GPIO if 2015-06-12 19:10:49 +02:00
Joakim Gebart
65f088a246 kinetis: hwtimer refactor/rewrite
- Use hwtimer_set for hwtimer_set_absolute()
 - Collect hwtimer statistics with #if ENABLE_STATS
 - Assembler optimized functions for CNR handling
 - Correct off-by-1 after counter reset
 - Defer CMR update from hwtimer_unset until ISR fires
2015-06-04 14:25:29 +02:00
Joakim Gebart
7a9f6f9796 Merge pull request #3140 from gebart/pr/kinetis-hwtimer-isr-off-by-1
kinetis: hwtimer fix off-by-1 in LPTMR ISR
2015-06-02 19:23:10 +02:00
Joakim Gebart
06c41108c7 kinetis: hwtimer fix off-by-1 in LPTMR ISR 2015-06-02 11:21:49 +02:00
Johann Fischer
072d0a80c7 cpu/kinetis_common/ldscripts: adapt for newlib module 2015-05-31 18:24:05 +02:00
Peter Kietzmann
6dc0e789e1 Merge pull request #3101 from gebart/pr/warning-fixes
Various warning fixes
2015-05-31 17:03:49 +02:00
Hauke Petersen
de31e1f9e8 cpu/kinetis_common: fixes to fault_handlers 2015-05-29 16:42:05 +02:00
Joakim Gebart
697b85c182 kinetis: fix SPI double initialization warnings 2015-05-29 14:23:01 +02:00
Joakim Gebart
ec3679fd13 kinetis: spi_init_slave add missing callback assignment 2015-05-29 14:23:01 +02:00
Joakim Gebart
d4c1436de9 kinetis: fix warnings
- find_closest_x: sign-compare
 - hwtimer_arch: unused-parameter
 - i2c_init_slave: unused-parameter
 - rnga: sign-compare
 - rngb: sign-compare
 - spi_transfer_bytes: sign-compare
 - spi_transfer_regs: sign-compare
 - timer: unused-parameter
2015-05-29 14:21:52 +02:00