Joakim Nohlgård
158a8300c4
kinetis: LPUART: Compute oversampling rate at init
...
By not forcing a fixed oversampling rate we can achieve better baud rate
accuracy than otherwise possible.
For example, when requesting 115200 with a module clock of 4 MHz,
picking an oversampling rate of 17 (instead of hardware
default 16) yields 117647 baud instead of 125000 baud as the best
matching rate. Better matching baud rate between receiver and
transmitter results in a lower probability of transmission errors.
2018-11-29 14:24:16 +01:00
Joakim Nohlgård
870385530d
kinetis: Allow override of FOPT setting in fcfield.c
2018-11-28 00:21:35 +01:00
Joakim Nohlgård
d63672798e
kinetis: Allow FOPT settings other than 0xff
...
These bits configure some early boot options and may be necessary to
use on certain boards to ensure a robust boot sequence.
2018-11-27 16:00:42 +01:00
Joakim Nohlgård
8bb73f237d
kinetis: GPIO: avoid dup calls to cortexm_isr_end on KW41Z
...
Devices with combined IRQs would call the cortexm_isr_end handler twice
when it is part of the irq_handler routine.
2018-11-08 14:52:10 +01:00
Joakim Nohlgård
b9ceac5ccc
kinetis: Optimize GPIO IRQ handler
...
Measurements show that the time from pin edge until return from
interrupt is reduced from 22 us to 6.1 us for KW41Z running at
41.94 MHz. The measurements used a no-op GPIO callback for testing and
were measured using an external logic analyzer.
2018-11-08 14:52:10 +01:00
Martine Lenders
53a9797e56
kinetis: mark closing #endif for MODULE_PERIPH_GPIO_IRQ
2018-10-09 15:11:00 +02:00
Joakim Nohlgård
7a857a939c
Merge pull request #9807 from gebart/pr/kinetis-adc-average
...
kinetis: ADC: Add hardware averaging configuration
2018-09-26 12:54:29 +02:00
Hauke Petersen
e71281943a
cpu/kinetis/gpio: use gpio_irq feature
2018-09-26 09:53:30 +02:00
smlng
59e299635b
cppcheck: add/correct reason for cppcheck-suppress
...
Adding and correcting description/rational on why certain cppcheck
warnings or errors are intentionally suppressed.
2018-09-25 12:03:58 +02:00
Joakim Nohlgård
dd2fad6b9b
kinetis: ADC: Add hardware averaging configuration
...
This allows a board configuration to select which kind of averaging
should be applied to the pin instead of always using 32 sample average.
Very high impedance sources may need to disable hardware averaging in
order to give correct values, the on-chip temperature sensor is one such
signal source.
2018-09-12 16:32:48 +02:00
Joakim Nohlgård
8996cbe313
make: Introduce new feature flag periph_gpio_irq
2018-08-29 08:53:20 +02:00
Martine Lenders
426cfbeea6
kinetis: timer: #ifdef unused functions
...
Another issue revealed by compiling several apps with LLVM/clang for
the `teensy31` board.
2018-08-13 18:38:13 +02:00
Martine Lenders
376c10feff
kinetis: uart: fix unused-function warning
...
When compiling with LLVM (should also be seen `-Wunused-function` in
GCC), I get an error for `frdm-k22f`. This should fix that.
2018-08-08 10:02:53 +02:00
smlng
0b9a54f184
cpu/kinetis: suppress selfAssignement warning by cppcheck
...
cppcheck raises a warning due to self assignment. As this is
intentional to clear all IRQ on register status flags, this
warning is suppressed now.
2018-07-25 12:01:40 +02:00
Joakim Nohlgård
31b461d71c
kinetis: Interrupt based I2C transfers
2018-07-25 12:01:39 +02:00
Joakim Nohlgård
175f398b58
kinetis: Refactor I2C driver
2018-07-25 12:01:39 +02:00
Joakim Nohlgård
3ac45b5aa2
kinetis: Reflow text in doc.txt
2018-07-25 12:01:38 +02:00
Joakim Nohlgård
172af17ae4
kinetis: Conditionally enable MCG
2018-06-30 19:14:59 +02:00
Joakim Nohlgård
28fe4b8653
kinetis: Clean up SPI module power handling
...
Fixes a problem with hardware CS when using slow SPI speeds,
mentioned in https://github.com/RIOT-OS/RIOT/issues/6437#issuecomment-283114795
2018-06-27 19:21:39 +02:00
938677cc83
cpu*: fix doxygen grouping
2018-06-11 19:12:02 +02:00
Francisco Acosta
9a0f3469b7
Merge pull request #8930 from gebart/pr/kinetis-rtt-refactor
...
kinetis: Refactor RTT driver
2018-05-30 14:54:15 +02:00
Francisco Acosta
6e484f7aed
Merge pull request #8814 from gebart/pr/kinetis-periph-timer-tfc
...
cpu/kinetis: Refactor LPTMR timer implementation
2018-05-29 15:54:11 +02:00
Loïc Dauphin
b7a8ba73a9
Merge pull request #8933 from gebart/pr/kinetis-pit-refactor
...
kinetis: Refactor PIT timer driver implementation
2018-05-29 11:09:55 +02:00
Joakim Nohlgård
09e0e8953d
kinetis: GPIO: Enable the correct IRQn on CM0+
2018-05-24 23:54:56 +02:00
Joakim Nohlgård
fb73067494
kinetis: Refactor PIT driver
...
Stop prescaler instead of counter channel to avoid the need for saving
and restoring timeouts
2018-05-22 16:47:35 +02:00
Joakim Nohlgård
16af9b0beb
kinetis: Clean up PIT timer implementation
2018-05-22 16:47:23 +02:00
Joakim Nohlgård
a6c30ab61d
kinetis: Move RTT config to periph_cpu.h
2018-05-22 16:46:39 +02:00
Joakim Nohlgård
c7801e466d
kinetis: Refactor RTT driver
...
- Keep counter value between resets
- Let kinetis_mcg_init manage the RTC oscillator, to avoid disrupting
the core clock in certain configurations
- Remove some unnecessary macros for hardware abstraction; all Kinetis
CPUs which have an RTC only have a single RTC instance, and the ISRs
and hardware registers are named the same way in all Kinetis CPU
headers.
2018-05-22 16:46:39 +02:00
Joakim Nohlgård
9e10cd4401
cpu/kinetis: Refactor LPTMR driver implementation
...
Uses timer freerunning counter mode (TFC) and updating an internal
reference point instead of relying on RTT for reference time. The
target accuracy has been greatly improved for all test cases in
bench_periph_timer
2018-05-22 16:45:41 +02:00
Joakim Nohlgård
179e8505ba
kinetis: Const ISR vector padding
...
Fixes misleading .data usage in size output because the .vectors section
is now properly marked as read-only in the ELF file.
2018-05-09 00:32:28 +02:00
Joakim Nohlgård
321aa567d6
kinetis: Memory segment attribute fixes
...
vectors and flashsec memory segments will not be considered for orphan
sections if rx is only given for the rom segment.
2018-05-05 08:11:00 +02:00
Joakim Nohlgård
c54f6b4fcf
kinetis: Refactor clock generator initialization
2018-04-17 06:59:22 +02:00
Gaëtan Harter
fff5810191
Makefile.include: FIX .DEFAULT_GOAL not being all
...
.DEFAULT_GOAL was reset many times which removed 'all' from being the default
goal.
By chance it was then set to `link` so was working by some magic.
2018-03-28 16:59:00 +02:00
Hauke Petersen
47a500d0b1
Merge pull request #8447 from haukepetersen/opt_test_periphuartpower
...
tests/periph_uart: included power_on/off() in test
2018-03-05 09:49:20 +01:00
Joakim Nohlgård
68ea6b3316
kinetis: Add support for NXP Kinetis KW41Z SoC
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
2090dd0234
kinetis: Add GPIO ISR for CPUs with combined PORTB+PORTC interrupt
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
8642c8ceb8
kinetis: Support CM0+ devices with 96 bit UID
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
005b4bfbb3
kinetis: Filter out PWM code if no FTM exists
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
11361ec7e1
kinetis: Add support for CPUs with a single IRQ for all PIT channels
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
2b64452c33
kinetis: GPIO workaround for missing open drain support
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
a196bb431d
kinetis: Only configure PWM settings if the FTM device exists
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
ba76402d03
kinetis: Add Bit Manipulation Engine helpers
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
18908667a3
kinetis: Make open drain GPIO availability depend on CPU header
2018-03-02 15:38:39 +01:00
Joakim Nohlgård
2bdf0bfbf1
kinetis: Align definitions in cpu_conf_kinetis.h
2018-03-02 14:39:00 +01:00
Joakim Nohlgård
82e960b642
kinetis: Set LPUART clock source during uart_lpuart_init
2018-03-02 14:39:00 +01:00
Francisco Acosta
2e701bd535
Merge pull request #8725 from gebart/pr/kinetis-errata-func
...
kinetis: Move errata workarounds to separate function
2018-03-02 12:30:16 +01:00
Francisco Acosta
a31940eee4
Merge pull request #8723 from gebart/pr/kinetis-periph-cpu-doc-fix
...
kinetis: periph_cpu.h doc fix
2018-03-02 12:03:06 +01:00
Hauke Petersen
8ac3465ba7
cpu/kinetis: add empty uart/power_x functions
2018-03-02 10:53:55 +01:00
Joakim Nohlgård
fd76e5ddad
kinetis: Move errata workarounds to separate function
2018-03-02 08:17:00 +01:00
Joakim Nohlgård
f5edf56be4
kinetis: periph_cpu.h doc fixes
2018-03-02 08:06:46 +01:00