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

1321 Commits

Author SHA1 Message Date
Hauke Petersen
f0d9574de1 cpu/samd21: fixed broken spi_transfer_byte function 2015-05-19 18:05:36 +02:00
Peter Kietzmann
b393e530da Merge pull request #3024 from haukepetersen/fix_stm32f1_uart
cpu/stm32f1: fixed uart_init()
2015-05-19 14:43:03 +02:00
Joakim Gebart
ae5098bb9b cpu/stm32f0/include/stm32f091xc.h: Replace tabs by spaces 2015-05-19 12:25:46 +02:00
Hauke Petersen
9878f78050 cpu/nrf51822: added minimal radio driver
This driver aims to behave like 802.15.4 devices do, supporting
short addressing, PAN ID and address broadcasts.
2015-05-19 10:02:57 +02:00
BytesGalore
369e7bbf43 Merge pull request #2540 from josephnoir/topic/cpp-stl-compatibility
Add replacement headers for std thread, mutex and condition_variable
2015-05-19 07:56:54 +02:00
haukepetersen
84be07f2ab cpu/stm32f1: fixed uart_init()
- added linebreak to funtion declaration
- fixed saving of callback argument
2015-05-18 21:12:23 +02:00
Peter Kietzmann
b3e78ddc33 Merge pull request #3016 from gebart/pr/tab-indentation
Inconsistent indentation in some files
2015-05-18 15:45:15 +02:00
df7deccd25 Merge pull request #2976 from gebart/pr/cortex-m-initial-stack-alignment
cortex-m: initial stack alignment to 64bit
2015-05-18 15:01:30 +02:00
Joseph Noir
bddaee751d Add replacement headers for thread, mutex and cond
These headers do not provide full stl functionality,
but a small subset:
* thread and this_thread
* condition_variable (some timed functions are missing)
* mutex, lock_guard and unique_lock
2015-05-18 13:57:02 +02:00
Martine Lenders
e53cdbb1b5 Merge pull request #3015 from gebart/pr/cppcheck-warnings
cppcheck drive-by fixes
2015-05-18 11:51:22 +02:00
Hauke Petersen
9e92ad5e89 Merge pull request #2948 from d00616/cpu_nrf51_poweropt_random
cpu/nrf51822/periph/random Power optimization
2015-05-18 10:41:44 +02:00
Joakim Gebart
273481455b stm32l1: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
6000b29440 stm32f4: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
d0709d914e stm32f1: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
04c445c17e mc1322x: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
a595ab00af lpc2387: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
dbb4ff1744 kw2x: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
0f23a9a599 cortex-m4: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
a0e6cc7504 cortex-m3: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
b39b4fc6d1 cortex-m0: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
Joakim Gebart
01c5120039 cortex-m: Suppress cppcheck error about uninitialized result
False positive, the variable result is assigned from within inline assembly
2015-05-18 06:29:35 +02:00
Frank Holtz
85248ddec8 cpu: nrf51822/periph/random Power optimization 2015-05-16 10:39:30 +02:00
Joakim Gebart
43b9150460 stm32f4: pwm_init: return actual frequency 2015-05-16 10:17:02 +02:00
Joakim Gebart
018b6a73d4 stm32f3: pwm_init: return actual frequency 2015-05-16 10:17:02 +02:00
Joakim Gebart
8619bdec63 lpc2387: pwm_init: return actual frequency 2015-05-16 10:17:02 +02:00
Johann F
1d60d9870d add support for Freescale MKW2x family devices 2015-05-15 08:05:43 +02:00
Joakim Gebart
76a49bc3d2 cortex-m3: Align initial stack pointer to 64 bits
AAPCS requires stack pointers to be aligned on a double word boundary.

In addition, Clang-3.6 assumes the stack pointer is always aligned to
a 8 byte boundary upon function entry, at least in armv7-m, causing
hard-to-find errors in the compiled code.

This is the same implementation as for the Cortex-M4
2015-05-13 09:17:07 +02:00
Joakim Gebart
eddd3177a5 cortex-m4: Align initial stack pointer to 64 bits
AAPCS requires stack pointers to be aligned on a double word boundary.

In addition, Clang-3.6 assumes the stack pointer is always aligned to
a 8 byte boundary upon function entry, at least in armv7-m, causing
hard-to-find errors in the compiled code.
2015-05-13 09:15:56 +02:00
Oleg Hahm
5079446beb Merge pull request #2937 from gebart/pr/kinetis-unsuppress-cppcheck
kinetis: unsuppress variable scope warnings in rnga.c
2015-05-12 23:24:09 +02:00
bapclenet
3f2afcd596 Merge pull request #2918 from daniel-k/samd21_rtt
cpu/samd21: Add RTT driver
2015-05-11 10:31:13 +02:00
Oleg Hahm
68ab3aa046 Merge pull request #2958 from mryndzionek/ret_status_fix
Propagate the return status
2015-05-10 21:54:53 +02:00
Oleg Hahm
69f07c601f Merge pull request #2949 from OlegHahm/crash_panic_foobar
core: panic unification
2015-05-10 21:54:43 +02:00
daniel-k
a31848ceb8 cpu/samd21: implement peripheral real time timer (periph/rtt) 2015-05-10 21:09:31 +02:00
mryndzionek
37f03c6f52 lpc1768: propagate the timer setting result up 2015-05-10 15:44:19 +02:00
Oleg Hahm
cb1f047f59 core: unified core_panic implementation 2015-05-10 11:58:43 +02:00
Oleg Hahm
828839316b core: renamed crash.h to panic.h 2015-05-09 18:44:10 +02:00
Joakim Gebart
cc27846ac3 cpu/stm32f4/include/stm32f415xx.h: Trailing whitespace 2015-05-09 09:17:27 +02:00
Joakim Gebart
12554b1537 cpu/stm32f3/include/stm32f334x8.h: Unix line endings 2015-05-09 09:16:56 +02:00
Joakim Gebart
03745f7884 cpu/nrf51822: Unix line endings 2015-05-09 09:13:26 +02:00
Joakim Gebart
7a84faf8bc cpu/lpc2387/linkerscript.x: Tabs->Spaces 2015-05-09 09:11:37 +02:00
Joakim Gebart
9ae63bac0b cpu/atmega_common/avr-libc-extra/time.h: trailing whitespace 2015-05-09 09:10:41 +02:00
Joakim Gebart
e9c567107d all: remove extra blank lines at the end 2015-05-09 09:10:08 +02:00
Joakim Gebart
64d7a5f55a kinetis: unsuppress variable scope warnings in rnga.c 2015-05-08 21:25:55 +02:00
bapclenet
bfaa4ea1e3 Merge pull request #2929 from bapclenet/samr21/rtc_isr
samd21/rtc_safety_isr
2015-05-08 14:39:14 +02:00
bapclenet
fa571013ee samr21/rtc safety isr 2015-05-07 20:18:49 +02:00
Joakim Gebart
f15fc173b9 arm7: Add ARCH_HAS_ATOMIC_SET_RETURN 2015-05-07 18:52:13 +02:00
René Kijewski
96ca6a6bef x86: Add atomic_cas implementation 2015-05-07 18:52:13 +02:00
Joakim Gebart
afc1dd3a6d cortex-m4: Add atomic_cas implementation 2015-05-07 18:52:13 +02:00
Joakim Gebart
b7db351400 cortex-m3: Add atomic_cas implementation 2015-05-07 18:52:13 +02:00
Joakim Gebart
46b9358e84 native: Remove generic atomic_set_return implementation
The removed implementation is the same as the generic implementation in core/atomic.c
2015-05-07 18:52:13 +02:00
Joakim Gebart
215ccc1213 core: Introduce atomic counters
- Move generic implementation of atomic_set_return to core/atomic.c
 - Generic implementation of atomic compare and swap in core/atomic.c
 - atomic_cas is used to implement atomic counters in core/include/atomic.h
 - atomic_int_t is an atomic integer type
 - ATOMIC_INIT can be used as an initializer for atomic_int_t
 - ATOMIC_VALUE gets a reference to the value of an atomic integer
2015-05-07 18:52:13 +02:00
Joakim Gebart
988ae54e4f cortex-m3_common: Homogenize documentation tags against Cortex-M0, Cortex-M4. 2015-05-07 18:52:13 +02:00
df3ed49305 cpu: samd21: switch to hwtimer compat wrapper 2015-05-06 12:04:53 +02:00
Peter Kietzmann
19425f56b0 Merge pull request #2872 from gebart/pr/kinetis-spi-slave-warnings
kinetis: Add SPI_[2-7] to spi_transmission_begin
2015-04-29 13:24:56 +02:00
Joakim Gebart
fd46cb2364 kinetis: Add SPI_[2-7] to spi_transmission_begin
Fix compiler warning about unhandled switch cases.
2015-04-28 22:21:57 +02:00
Hauke Petersen
6bf31c6e01 cpu/nrf51822: fixed spi_transfer_bytes 2015-04-28 16:01:48 +02:00
Oleg Hahm
3dd3bbb461 transceiver: use transceiver specific broadcast 2015-04-19 20:35:11 +02:00
Hauke Petersen
4a734d51ca Merge pull request #2798 from FrancescoErmini/extend_sam3x_gpio
cpu/sam3x: extend gpio implementation
2015-04-17 11:52:50 +02:00
Peter Kietzmann
3922f6e04c Merge pull request #2817 from jfischer-phytec-iot/pr@kinetis-enable-hwcs
kinetis_common: add a option to enable hardware CS for kinetis spi
2015-04-17 10:54:52 +02:00
Johann Fischer
36e89175b8 cpu/kinetis_common/spi.c: add a option to use hardware cs (PCS0 only)
minor fixes:
  - get rid of compiler warning "value 'SPI_1' not handled in switch"
  - add a giant macro to avoid redundant code in spi_init_master
2015-04-17 09:05:37 +02:00
Francesco Ermini
ca743ae97b cpu/sam3x: extend gpio implementation
fix functions arguments

extended sam3x GPIO from 16 to 31

fix GPIO_NUMOF to 32

add GPIOs

extend GPIO 16-31  for ArduinoDue/UDOO

fix white space at the end  gpio_clear
2015-04-15 17:56:00 +02:00
Hauke Petersen
5893ca8851 cpu/stm32f1: fixed GPIO interrupt cb arg handling 2015-04-15 15:39:57 +02:00
Peter Kietzmann
7c870f8730 Merge pull request #2767 from bapclenet/samr21/RTC
samr21/RTC
2015-04-10 11:11:00 +02:00
Oleg Hahm
c1ecccfbd8 Merge pull request #2282 from gebart/pr/k60-initial
Add support for Kinetis K60 CPUs and Eistec Mulle IoT board
2015-04-10 00:22:21 +02:00
Peter Kietzmann
33133c677e Merge pull request #2701 from gebart/pr/kinetis-gpio-lut
kinetis: Refactor GPIO to use a look-up-table
2015-04-09 16:10:12 +02:00
Joakim Gebart
7f64920cd7 kinetis: Refactor GPIO to use a look-up-table
Saves a bunch of ROM space

mulle, gcc-4.9.2:
   text    data     bss     dec     hex filename
  20800     216   65320   86336   15140 /data/riotbuild/riotproject/tests/periph_gpio/bin/mulle/periph_gpio.elf
  18992     216   65320   84528   14a30 /data/riotbuild/riotproject/tests/periph_gpio/bin/mulle/periph_gpio.elf
  diff = 1808
  36080     272   65264  101616   18cf0 /data/riotbuild/riotproject/examples/default/bin/mulle/default.elf
  34296     272   65264   99832   185f8 /data/riotbuild/riotproject/examples/default/bin/mulle/default.elf
  diff = 1784
2015-04-09 13:53:21 +02:00
bapclenet
edfb255a5d samr21/RTC
Solve issue #2261 by using the external 32,768KHz Oscillator
2015-04-09 10:05:09 +02:00
d0dfbf0079 cpu: stm32f3: periph: gpio: fix possibly uninitialized variable access 2015-04-08 19:52:14 +02:00
8653e685bc stm32f3: gpio: fix isr2 2015-04-08 19:52:14 +02:00
bcb206be61 cpu: stm32f3: add myself as author 2015-04-08 19:52:03 +02:00
bb6b04bfaf cpu: stm32f3: SPI: remove empty line 2015-04-08 19:52:03 +02:00
cfcd06964a cpu: stm32f3: SPI: force 8bit transfers 2015-04-08 19:52:03 +02:00
333dae4c57 stm32f3: spi: ifdef stm32f303vc specific de/initialization 2015-04-08 19:52:03 +02:00
Cenk Gündoğan
4fae22bf3d cpu/native: do not exit when real_read returns 0 2015-04-06 10:18:46 +02:00
José Roberto de Souza
684b081a16 x86: fix FPU lazy swap
The ucontext->x86_fxsave is initialize as 512 bytes of zeros, but it
is not a valid value to be set onto FPU registers, causing a General
Protection Fault:

Interrupt 0x0d (General Protection Fault) while handling 0x07 (Device not available)
EAX=0012f4c0  ECX=001336e4  EDX=001334ac  EBX=001336e0
ESP=00123784  EBP=001237c8  ESI=00000200  EDI=00000000
Error code=00000000
CR0=80010031  CR2=00000000  CR3=0012d000  CR4=000001e0
EIP=0000:80010031  EFLAGS=0012d000
<stack trace>
00000000
???
</stack trace>
Halting.

So lets copy the initial state of FPU registers before FPU is used
and set it as the initial state of FPU to new threads(coroutine).
2015-04-02 19:27:17 -03:00
Joakim Gebart
de486ff79f k60: Initial commit of K60 CPU.
Tested on the following Freescale Kinetis K60 CPUs:

 - MK60DN512VLL10

The port should with a high probability also support the following variations of the above CPUs (untested):

 - MK60DN256VLL10

And possibly also:

 - MK60DX256VLL10
 - MK60DX512VLL10
 - MK60DN512VLQ10
 - MK60DN256VLQ10
 - MK60DX256VLQ10
 - MK60DN512VMC10
 - MK60DN256VMC10
 - MK60DX256VMC10
 - MK60DN512VMD10
 - MK60DX256VMD10
 - MK60DN256VMD10

Currently not working on the following CPUs (Missing PIT channel
chaining necessary for kinetis_common/periph/timer implementation):

 - MK60DN256ZVLL10
 - MK60DN512ZVLL10
 - MK60DX256ZVLL10
 - MK60DX512ZVLL10
 - MK60DN512ZVLQ10
 - MK60DN256ZVLQ10
 - MK60DX256ZVLQ10
 - MK60DN512ZVMC10
 - MK60DN256ZVMC10
 - MK60DX256ZVMC10
 - MK60DN512ZVMD10
 - MK60DX256ZVMD10
 - MK60DN256ZVMD10

Regarding header files from Freescale:

   dist/tools/licenses: Add Freescale CMSIS PAL license pattern

Redistribution is OK according to:

https://community.freescale.com/message/477976?et=watches.email.thread#477976

Archive copy in case the above link disappears:

https://web.archive.org/web/20150328073057/https://community.freescale.com/message/477976?et=watches.email.thread

Applies to:
 - MK60DZ10.h (K60 variant)
2015-03-28 08:30:13 +01:00
Ludwig Ortmann
1572c94e41 cpu/samd21: implement gpio_toggle properly
Before, gpio_toggle relied on gpio_read which is inefficient and does not
work with GPIOs configured as outputs.
2015-03-25 22:05:05 +01:00
Hauke Petersen
ad69413d22 Merge pull request #2669 from gebart/pr/cortex-thread-arch-asm
cortex-m4_common: Refactor context save/restore
2015-03-25 18:21:11 +01:00
Joakim Gebart
791c57720a cortex-m4_common: Refactor context save/restore
Clang 3.6 is stricter than GCC and previous releases of Clang regarding
naked functions and now only allows inline asm inside naked functions.

This is a refactoring of the functions isr_pendsv, isr_svc,
context_save, context_restore to still be naked functions but allow
building with Clang 3.6
2015-03-21 18:43:01 +01:00
Ludwig Ortmann
cf637942cc *: add missing blank lines
Some functions had no blank lines to separate them from their
neighborhood.
2015-03-21 16:34:59 +01:00
James Hollister
93cff5613f cpu/native: Fix for missing malloc.h in OSX 2015-03-21 01:41:54 -07:00
Hauke Petersen
66e7646091 cpu/nrf51822: added SPI driver implementation 2015-03-17 10:37:47 +01:00
Hauke Petersen
4ad36a799e cpu/stm32f0: added support for stm32f091rc 2015-03-16 16:23:44 +01:00
Thomas Eichinger
c633c083db Merge pull request #2597 from haukepetersen/add_stm32f0_corepanic
cpu/stm32f0: included core_panic module
2015-03-16 15:15:33 +01:00
Hauke Petersen
3436a10039 cpu/stm32f0: included core_panic module 2015-03-13 17:40:37 +01:00
Hauke Petersen
ec17730c38 cpu/stm32f0: fixed gpio interrupt routines
- guarded calls in case no interrupt is defined
- eneabled detection of multiple, simoultaneous events
2015-03-13 15:32:48 +01:00
Thomas Eichinger
1eac81b562 Merge pull request #2593 from haukepetersen/fix_stm32f0_timerdef
cpu/stm32f0: cleanup for timer IRQ macro
2015-03-13 14:23:41 +01:00
Thomas Eichinger
64410350bd Merge pull request #2552 from jhollister/add_cpuid
Added cpuid_get for STM boards
2015-03-13 10:59:09 +01:00
Hauke Petersen
49491cf66d cpu/stm32f0discovery: fixed timer irq prio macro 2015-03-13 10:21:18 +01:00
Joakim Gebart
f8eb76caec kinetis: Enable UART hardware FIFO buffers. 2015-03-10 17:52:07 +01:00
kushalsingh007
390e030f84 Removing the warnings after running static code analyser.
-Changes to fix all the clarifyCalulation warnings.
-Fixes a part of issue number 480
2015-03-10 04:08:43 +05:30
James Hollister
722835989d cpu/stm32f4: added cpuid_get to stm32f4 2015-03-08 12:18:37 -07:00
James Hollister
10f4aacf6c cpu/stm32f3: added cpui_get for stm32f3 2015-03-08 12:14:19 -07:00
James Hollister
3d6ab85bb3 cpu/stm32f0: added cpuid_get for stm32f0 2015-03-08 12:13:10 -07:00
Hauke Petersen
d19515d590 cpu/stm32f3: set cpu specific hwtimer spin barrier 2015-03-04 10:44:26 +01:00
Joakim Gebart
f317cf42a8 kinetis: Add configuration macros for I2C bus speed parameters. 2015-03-04 08:55:06 +01:00
Thomas Eichinger
bc378dbb23 Merge pull request #2378 from locicontrols/vtor
cpu/cc2538: set the VTOR register to the actual address of the vector table
2015-03-03 18:25:47 +01:00
Ludwig Ortmann
4f29a7757e Merge pull request #2285 from authmillenon/pktbuf/api/use-pkt
pktbuf: port to use pkt_t instead of void*
2015-02-19 14:46:15 +01:00
Martine Lenders
41f60aca4c pktbuf: port to use ng_ version 2015-02-19 13:51:27 +01:00
Lotte Steenbrink
f08a371f1f Merge pull request #2466 from LudwigOrtmann/pr/trailing_whitespace
cpu, drivers, boards, tests: remove trailing whitespace
2015-02-18 19:10:22 +01:00
Ludwig Ortmann
51a4f8a43c cpu/kinetis_common/i2c: fix indent, trailing space 2015-02-18 13:52:48 +01:00
Ludwig Ortmann
e9e3f3d148 cpu/samd21/periph/i2c: fix spacing, comment length 2015-02-18 13:52:48 +01:00
Ludwig Ortmann
cec87139a5 core, cpu, drivers, tests: remove trailing space 2015-02-18 13:52:48 +01:00
Ludwig Ortmann
88f1dc5cbc cpu/native: improve daemonization
- detach from working directory
- detach from process group
- set umask
2015-02-17 22:01:02 +01:00
Ludwig Ortmann
9a130e2e84 cpu/native: add some syscall wrappers
Add wrappers for chdir, setsid, and umask.
2015-02-17 22:00:14 +01:00
Joakim Gebart
b6eeb65f70 Merge pull request #2420 from gebart/pr/cortex-m4-crash-bkpt
cortex-m4_common: Add debugger break in crash.c + minor string handling fix
2015-02-17 16:06:33 +01:00
Joakim Gebart
5a09e54e1b cortex-m0_common: Update crash.c with changes from Cortex-M4. 2015-02-17 13:16:40 +01:00
Joakim Gebart
2605b57a35 cortex-m3_common: Update crash.c with changes from Cortex-M4. 2015-02-17 13:16:26 +01:00
Joakim Gebart
972e61529c cortex-m4_common: Update crash.c author and copyright after recent changes. 2015-02-17 13:15:40 +01:00
Joakim Gebart
f6ce0561ed Merge pull request #2412 from jfischer-phytec-iot/pr@kinetis-startup
Add common startup.c for Kinetis MCUs.
2015-02-15 18:48:19 +01:00
haukepetersen
28655049a5 cpu/sam3x8e: use core_panic for fault ISRs 2015-02-15 11:20:59 +01:00
Johann Fischer
8afc8dfdc3 cpu/kinetis_common: add common startup.c
cpu/kinetis_common/wdog.c: move wdog disable code to initial wdog driver
  cpu/kinetis_common/wdog.c: add COP WDOG
  cpu/kinetis_common/include/wdog.h: add configuration example
  cpu/kinetis_common: add fault handlers
  cpu/kinetis_common: add .ramcode and ISR vector relocation to startup.c
2015-02-15 10:28:13 +01:00
Joakim Gebart
a745c018da kinetis: Refactor RTC into RTT, add RTC wrapper. 2015-02-14 14:20:26 +01:00
Martine Lenders
9077299d06 msp430: add assert header 2015-02-12 14:24:06 +01:00
Ian Martin
c3417d151a cpu/cc2538: vector table address and alignment
Enforce the 512-byte vector table alignment and set the
VTOR register to the actual address of the vector table.
2015-02-11 11:09:19 -05:00
Fabian Nack
36025280de cpu/stm32f4: Add low power mode implementation 2015-02-11 10:04:26 +01:00
Joakim Gebart
7829a55a8c cortex-m4_common: Minor fixes for string handling in core_panic() 2015-02-10 13:33:30 +01:00
Joakim Gebart
0b7a929ec6 cortex-m4_common: Add debugger break in crash.c 2015-02-10 13:09:43 +01:00
Hauke Petersen
02831e325f cpu/nrf51822: use of core_panic in startup code 2015-02-10 09:40:35 +01:00
Joakim Gebart
bf730c1c60 Merge pull request #2415 from haukepetersen/add_m0_crash
cpu/cortex_m0_common: added crash.c
2015-02-10 09:18:01 +01:00
Joakim Gebart
4d47e652dc Merge pull request #2416 from haukepetersen/add_m4_crash
cpu/cortex-m4_common: added crash.c
2015-02-10 08:07:19 +01:00
Hauke Petersen
68b167ca77 cpu/cortex-m4_common: added crash.c 2015-02-09 18:28:32 +01:00
Hauke Petersen
7a11301451 cpu/cortex_m0_common: added crash.c 2015-02-09 18:27:42 +01:00
Joakim Gebart
29d3959b10 kinetis: Add shared Kinetis linker script. 2015-02-09 17:52:04 +01:00
Ludwig Ortmann
dd2da2fb71 Merge pull request #2405 from cgundogan/restrict_with_leading_underscores
Use `__restrict` instead of `restrict`
2015-02-08 22:07:23 +01:00
Cenk Gündoğan
432f0014c0 cpu: restrict => __restrict 2015-02-08 19:15:14 +01:00
Martine Lenders
0eb2d78dda doc: use my real name 2015-02-08 18:52:16 +01:00
Hauke Petersen
21dd39249f cpu/nrf51822: raised default stack size 2015-02-07 13:22:18 +01:00
Joakim Gebart
890262e6ff Merge pull request #2265 from jfischer-phytec-iot/pr@kinetis_common
Support for Freescale Kinetis MCUs, kinetis_common
2015-02-05 10:00:02 +01:00
Thomas Eichinger
304d3b13eb Merge pull request #2371 from gebart/pr/cmsis-hal-4.0
Update CMSIS HAL to version 4.0
2015-02-04 15:50:17 +01:00
Johann F
c0628a3058 cpu/kinetis_common: initial import for kinetis_common
add peripheral drivers for Freescale Kinetis MCUs:
    adc driver
    cpuid driver
    gpio driver
    hwtimer_arch driver (hwtimer used Low Power Timer)
    i2c driver (master mode only)
    mcg driver
    pwm driver
    random_rnga driver
    random_rngb driver
    rtc driver
    spi driver
    timer driver (timer used Periodic Interrupt Timer)
    uart driver
  add doc.txt (configuration examples)

  random_rnga: Update RNGA driver in preparation for RNGB driver.
  random_rngb: Add RNGB driver.
  spi: refactor SPI to work for multiple CTARS, add spi_acquire, spi_release
  gpio: Add gpio_irq_enable, gpio_irq_disable. Refactor GPIO.
  gpio: Add gpio_irq_enable, gpio_irq_disable.
  gpio: Refactor ISR functions to work with all GPIOs (0-31) and all ports (PORTA-PORTH)
  adc: Refactor ADC, add calibration and scaling.
    Added integer scaling of results in adc_map.
    Handle precision setting in adc_init.
    Set ADC clock divider depending on module clock.
    Add ADC_1 as a possible device.
    Add ADC calibration procedure according to K60 ref manual.
    Handle ADC pins which are not part of the pin function mux.
  Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-02-04 14:50:54 +01:00
Joakim Gebart
45dbbd18ae stm32f0: Remove Doxygen from already documented functions. 2015-02-01 08:09:46 +01:00
Joakim Gebart
f977448d18 cortex-m0: Add extern "C" to core_cmInstr.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:29 +01:00
Joakim Gebart
ae8c7607ea cortex-m0: Add extern "C" to core_cmFunc.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:29 +01:00
Joakim Gebart
8c00ee0d7b cortex-m0: Update to CMSIS HAL 4.0
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:29 +01:00
Joakim Gebart
068dfdff4b cortex-m3: Add extern "C" to core_cmInstr.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:29 +01:00
Joakim Gebart
489caf0be0 cortex-m3: Add extern "C" to core_cmFunc.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
463d4a1cf4 cortex-m3: Update to CMSIS HAL 4.0
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
53b29f40e7 cortex-m4: Add extern "C" to core_cmInstr.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
0d8aaf86a8 cortex-m4: Add extern "C" to core_cmFunc.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
fe43bb2b7a cortex-m4: Update to CMSIS HAL 4.0
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 09:38:31 +01:00
haukepetersen
bb1288b775 cpu/stm32f3: added support for stm32f334r8 2015-01-27 23:14:10 +01:00
BytesGalore
714ee38355 boards: core: cpu: drivers: sys: added missing header guards 2015-01-27 19:10:57 +01:00
Fabian Nack
870a695a38 cpu/stm32f4: Adapt PWM implementation to allow timers with < 4 channels 2015-01-22 02:24:00 +01:00
Peter Kietzmann
eaf9cc32e6 Merge pull request #2308 from haukepetersen/fix_stm32f0_gpioclks
cpu/stm32f0: fixed port clk en for GPIO driver
2015-01-21 10:20:10 +01:00
haukepetersen
0f746047d7 cpu/stm32l1: repaired doxygen group 2015-01-21 09:34:31 +01:00
Hauke Petersen
3976554f12 cpu/stm32f0: fixed port clk en for GPIO driver 2015-01-21 08:14:31 +01:00
Ludwig Ortmann
e03596f9d6 Merge pull request #2324 from LudwigOrtmann/native-random-warnings
cpu/native: warn about uninitialized random module
2015-01-20 09:28:51 +01:00
Peter Kietzmann
ebadbd6da3 Merge pull request #2323 from thomaseichinger/i2c_mutex
periph/i2c: added means to make I2C thread-safe
2015-01-20 07:57:20 +01:00
Peter Kietzmann
0c3083200d Merge pull request #2317 from gebart/pr/spi-locking
drivers/periph/spi: Implement thread safety for all SPI devices
2015-01-20 07:27:49 +01:00
Joakim Gebart
d68b4ef6c2 stm32l1: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:37 +01:00
Joakim Gebart
3292987516 stm32f3: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:34 +01:00
Joakim Gebart
f64c54bf66 stm32f1: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:31 +01:00
Joakim Gebart
98c88b0549 stm32f0: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:23 +01:00
Joakim Gebart
bec43f11d8 samd21: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:20 +01:00
Joakim Gebart
b20f21f2c5 sam3x8e: Basic implementation of spi_acquire(), spi_release()
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-19 19:05:15 +01:00
Thomas Eichinger
830b2b2312 cpu/stm32l1: make i2c thread-safe 2015-01-19 12:20:09 +01:00
Thomas Eichinger
8821e0edcf cpu/stm32f4: make i2c thread-safe 2015-01-19 12:20:09 +01:00
Thomas Eichinger
30040fa311 cpu/samd21: make i2c thread-safe 2015-01-19 12:20:09 +01:00
Thomas Eichinger
fe643f7077 periph/i2c: added means to make I2C thread-safe
As discussed in #2289 this changes provide means to
use the i2c interface safely within multible threads.
2015-01-19 12:18:03 +01:00
Thomas Eichinger
5ae38d6dc7 Merge pull request #1927 from kaspar030/add_lto_flags
make: optionally build with gcc's link time optimization
2015-01-19 11:33:32 +01:00
Ludwig Ortmann
3465213118 cpu/native: warn about uninitialized random module 2015-01-19 11:21:01 +01:00
Hauke Petersen
70a5df67a5 cpu/stm32f4: made SPI driver thread safe 2015-01-17 15:13:51 +01:00
Hauke Petersen
c3cdfe7ef7 Merge pull request #2315 from fnack/spi_clock
cpu/stm32f4: Fix SPI baud rate control settings
2015-01-16 11:19:18 +01:00
Fabian Nack
672a362f2e cpu/stm32f4: Corrected wrong spi baud rate control settings 2015-01-16 09:24:48 +01:00
Hauke Petersen
23ecb09f12 cpu/stm32f4: added lost port clock eanble 2015-01-15 14:23:06 +01:00
Ludwig Ortmann
c4d4458651 Merge pull request #2243 from LudwigOrtmann/native-calloc
native: fix real_calloc, _native_in_calloc  initialization
2015-01-14 14:05:06 +01:00
Ludwig Ortmann
88fa49ab38 cpu/native: add high-quality random implementation
Per default random data is read from `/dev/random` now.

If specified (e.g. `-s 4711`), data is generated by calls to POSIX
random function like before. The POSIX random API is initialize with
the given seed (`srandom(4711);` in this example).
2015-01-14 11:51:23 +01:00
Hauke Petersen
b435a488fa Merge pull request #2026 from thomaseichinger/stm32l1
stm32l1: initial port for the nucleo-l1 board and stm32l1 cpu
2015-01-12 21:33:21 +01:00
Thomas Eichinger
07d76d7127 stm32l1: initial port for the nucleo-l1 board and stm32l1 cpu 2015-01-12 15:13:19 +01:00
Troels Hoffmeyer
29b0e73350 samr21: cpuid implemented by reading 128 bits from flash 2015-01-12 13:50:16 +01:00
Ludwig Ortmann
3ab73bc633 cpu/native: init _native_in_calloc explicitly 2015-01-11 10:59:49 +01:00
Ludwig Ortmann
f5cfda977a cpu/native: fix real_calloc initialization 2015-01-11 10:59:49 +01:00
Thomas Eichinger
2ea028dd51 Merge pull request #2011 from haukepetersen/add_stm32f3_spi
cpu/stm32f3: added SPI driver
2015-01-09 11:46:06 +01:00
9fffd99493 stm32f1: mark interrupt vector table as __attribute__((used))
Enables gcc LTO for stm32f1 based boards
2015-01-08 15:59:54 +01:00
Oleg Hahm
9bddd61115 Merge pull request #2207 from gebart/pr/lpc2387-gc-sections
msba2: Use --gc-sections when linking.
2015-01-08 14:05:27 +01:00
Hauke Petersen
a365619854 cpu/stm32f3: added SPI driver 2015-01-07 20:18:25 +01:00
Hauke Petersen
905a7f2f56 Merge pull request #1867 from haukepetersen/fix_stm32f0_uartremodel
cpu/stm32f0: optimizations to UART driver
2015-01-07 20:11:59 +01:00
Hauke Petersen
3987f528f4 cpu/stm32f0: optimizations to UART driver 2015-01-07 20:11:15 +01:00
Joakim Gebart
99319f4e28 [SQUASH ME] lpc2387: Add missing *(data.*) to linker script. 2015-01-07 19:10:58 +01:00
Ludwig Ortmann
7d948e4d65 Merge pull request #2260 from bapclenet/samr21/RTC
SAMR21/RTC: Error negative second fixed
2015-01-07 18:33:24 +01:00
bapclenet
f49661f617 cpu/samd21: fix rtc negative second error 2015-01-07 17:07:41 +01:00
Oleg Hahm
6dac96ad1b Merge pull request #1904 from LudwigOrtmann/native_bufferbloat
native: increase buffer size, set defaults conditionally
2015-01-07 03:00:01 +01:00
benpicco
9c50f206c5 Merge pull request #2252 from benpicco/samd21-malloc
cpu/samd21: check if the requested memory is really available in _sbrk_r
2015-01-06 20:31:09 +01:00
Benjamin Valentin
070420db7d samd21: check if the requested memory is really available in _sbrk_r
copy the check from sam3x8e
2015-01-06 19:22:46 +01:00
Thomas Eichinger
d6c4d5581f Merge pull request #2215 from bapclenet/samr21/RTC
cpu/samd21: add rtc periph implementation
2015-01-06 18:21:22 +01:00
Thomas Eichinger
e6c4181c94 Merge pull request #2229 from LudwigOrtmann/issue-2228
cpu/samd21: increase default stack size
2014-12-28 02:26:46 +01:00
Ludwig Ortmann
5e0973ca89 Merge pull request #2150 from OlegHahm/more_doc_cleanup
doc: More documentation cleanup
2014-12-22 11:58:59 +01:00
Ludwig Ortmann
d74f7425a5 cpu/samd21: increase default stack size
Provide enough space to run `examples/default`.
2014-12-20 17:00:11 +01:00
Oleg Hahm
db58a8b226 Merge pull request #2214 from rousselk/msp430-fix-intr
Msp430 misc interrupt-related fixes
2014-12-19 16:35:39 +01:00
Hauke Petersen
6a35845203 Merge pull request #2223 from kaspar030/stm32f1_fix_function_definition
stm32f1: make function definition match declaration
2014-12-19 15:58:43 +01:00
547ddddad2 stm32f1: make function definition match declaration 2014-12-19 15:15:00 +01:00
Hauke Petersen
1bd63978a8 Merge pull request #2222 from haukepetersen/fix_lpc1768_uartclk
cpu/lpc1768: fixed UART PCLK selection
2014-12-19 14:21:08 +01:00
Hauke Petersen
31a6e81bd9 cpu/lpc1768: fixed UART PCLK selection 2014-12-19 13:47:58 +01:00
Kévin Roussel
892268d74b Ensure only GIE bit is touched in splx_() 2014-12-19 11:11:15 +01:00
Kévin Roussel
07b170595c Ensure interrupts are enabled before going in low-power mode 2014-12-19 11:11:14 +01:00
Kévin Roussel
91fd567c8f Use custom assembly code instead of MSP GCC primitives for dINT()/eINT()
and all other functions that enable or disable interrupts
2014-12-19 11:11:14 +01:00
Kévin Roussel
f9b0df7e4b Use TimerB for 'hwtimer' module implementation 2014-12-19 10:53:12 +01:00
Kévin Roussel
25ac0db606 Robust use of TimerA for 'hwtimer' module 2014-12-19 10:53:12 +01:00
Oleg Hahm
a17d89fbed Merge pull request #1619 from rousselk/msp430-hwtimer-16bit
Only use 16 significative bits for MSP430 hwtimers
2014-12-18 18:49:02 +01:00
bapclenet
55aabf9dfb cpu/samd21: add rtc periph implementation 2014-12-18 15:25:49 +01:00
Thomas Eichinger
ca53077e3c Merge pull request #1998 from Troels51/samr21-hwtimer-fix
samr21: 32 hwtimer
2014-12-17 17:29:36 +01:00
Troels Hoffmeyer
7124ec6258 samr21: implemented 32 bit hwtimer 2014-12-17 14:44:54 +01:00
Kévin Roussel
1fb12b770e Reduce variable scope in init function 2014-12-17 12:21:16 +01:00
Kévin Roussel
d101b30dd8 Make hwtimer_spin() work even with interrupts disabled
by using only 16 significative bits on MSP430 hardware timers
2014-12-17 12:21:07 +01:00
Thomas Eichinger
5689a7d218 Merge pull request #1997 from Troels51/samr21-transceiver-port
samr21: implemention of transceiver via spi
2014-12-17 11:56:37 +01:00
Joakim Gebart
390b8394d6 msba2: Use --gc-sections when linking.
- Add `-Wl,--gc-sections` to LDFLAGS
 - Add `-fdata-sections` and `-ffunction-sections` to CFLAGS
 - Update lpc2387 linker script to keep the isr vector and init
   sections when garbage collecting.
 - Keep .ctors and .dtors sections (similar to what binutils default
   linker script does when building for Linux targets)

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-12-17 11:37:58 +01:00
Hauke Petersen
765c4f38e5 Merge pull request #2201 from BytesGalore/mbed_lpc1768_uartUSB
board/mbed_lpc1768 changed the serial device to UART0
2014-12-17 10:35:03 +01:00
BytesGalore
c40e5267a6 board/mbed_lpc1768 changed the serial device to UART0
-> enables USB/serial communication
2014-12-17 07:27:28 +01:00
Ludwig Ortmann
e7f6f640f6 Merge pull request #2060 from OlegHahm/periph_rtc
drivers: Adapt old platforms to periph rtc
2014-12-16 18:56:59 +01:00
Troels Hoffmeyer
33ef43c8e2 samr21: implemented transceiver via spi, gpio changes 2014-12-16 17:43:30 +01:00
Oleg Hahm
60cd0d357d periph_rtc: streamline lpc2387 and cc430 naming 2014-12-16 17:02:44 +01:00
Oleg Hahm
849580a9c9 cpu: lpc2387: further rtc cleanup 2014-12-16 17:02:44 +01:00
Oleg Hahm
587920cc49 cpu: remove superfluous gettimeofday functions 2014-12-16 17:02:44 +01:00
Oleg Hahm
93cf446b55 rtc: cleanup of lpc2387-rtc implementation 2014-12-16 17:02:44 +01:00
Oleg Hahm
498edb1854 cc430: lpc2387: switch to new periph/rtc interface
Removes the old interface.
2014-12-16 17:02:44 +01:00
Hauke Petersen
78eed22dd2 cpu/lpc1768: added basic timer implementation 2014-12-16 16:57:31 +01:00
Ludwig Ortmann
2ec0a1ca02 native/rtc: apply naming conventions 2014-12-16 15:46:56 +01:00
Ludwig Ortmann
474c8afd93 native/rtc: define ENABLE_DEBUG, move include 2014-12-16 15:41:51 +01:00
Thomas Eichinger
29c5822e02 Merge pull request #2016 from bapclenet/master
cpu/samd21: I2C driver implementation (Master mode)
2014-12-15 16:58:19 +01:00
Ludwig Ortmann
f35981a6d7 native/rtc: improve implementation
* add error checking / warnings
* implement parts of alarm functionality
* clean up
2014-12-13 15:21:52 +01:00
Ludwig Ortmann
37a1a105bc native/rtc: clean up documentation 2014-12-13 15:21:52 +01:00
Ludwig Ortmann
c0ef84bb9f native: move rtc to periph
* adapt implementation to new interface
* remove now superfluous drivers directory
2014-12-13 15:21:52 +01:00
Oleg Hahm
e79e00ef7f doc: add documentation for packet format in mc1322x 2014-12-11 17:26:26 +01:00
bapclenet
54fb0f0610 cpu/samd21: add i2c periph implementation 2014-12-11 08:32:27 +01:00
Hauke Petersen
67b4dfd89d cpu/lpc1768: added basic UART driver 2014-12-08 19:48:20 +01:00
Ludwig Ortmann
0027f90be4 Merge pull request #2118 from OlegHahm/simplify_cpu_folder_structure
cpu: simplify folder structure
2014-12-08 13:10:13 +01:00
Oleg Hahm
a5dc951ef2 doc: fix doxygen group for cc2538 memory map 2014-12-06 14:32:22 +01:00
Oleg Hahm
04b67f1ff0 doc: avr cleanup 2014-12-06 01:12:31 +01:00
Oleg Hahm
cd81c040d8 uart0: remove superfluous prototype from header
Declare and document prototype in CPU part instead.
2014-12-05 20:33:10 +01:00
Oleg Hahm
000450c894 Merge pull request #2117 from OlegHahm/doxygen_eliminate_warnings
Doxygen eliminate warnings pt. 2
2014-12-04 17:18:42 +01:00
Oleg Hahm
43c86b5a3e doc: fix remaining doxygen warnings 2014-12-04 17:16:57 +01:00
Oleg Hahm
0ccf1043de doc: fixed broken doxygen references 2014-12-04 17:16:57 +01:00
Ludwig Ortmann
015f5598e4 native: cleanup irq_cpu, native_cpu debug output 2014-12-04 10:48:15 +01:00
Ludwig Ortmann
eb2cc522cd native: forced debug message for SIGUSR1 2014-12-04 10:38:12 +01:00
Ian Martin
58e413afce cpu/cc2538: add eh_frame section to the linkerscript
Fixes linker errors on some toolchains, for example:
  ld: foo.elf section `.eh_frame' will not fit in region `cca'
  ld: region `cca' overflowed by 40 bytes
2014-12-03 11:41:59 -05:00
Oleg Hahm
42436c9c37 Merge pull request #2120 from OlegHahm/fix_1235
native: removing externs from native tramp
2014-12-03 16:40:45 +01:00
Oleg Hahm
54bdc35ac8 native: removing externs from native tramp 2014-12-03 15:50:53 +01:00
Peter Kietzmann
8c189ce56e Merge pull request #2127 from thomaseichinger/stm32f1-fix-TIMER_1
cpu/stm32f1: use correct timer device in timer interrupt
2014-12-03 14:35:25 +01:00
Thomas Eichinger
18647bb5ac cpu/stm32f1: use correct timer device in timer interrupt 2014-12-03 13:28:55 +01:00
Martin
bfaacbbd38 cpu/arm_common: c++: initial support for c++ added _kill (weak) and weak attribute for _kill_r
boards/msba2: provided c++ feature (cpp)
2014-12-03 07:30:29 +01:00
Oleg Hahm
17929a5ce4 cpu: lpc2387: integrated lpc_common into lpc2387
Rationale 1: The common part made only sense for (some) NXP ARM7 MCUs,
but was misleading for MCUs like the LPC1768.

Rationale 2: The common part was only used by one specific MCU
implementation - no need to outsource it.
2014-12-02 17:47:10 +01:00
Oleg Hahm
0c967c4d3f cpu: msp430: renamed msp430x16x to msp430fxyz 2014-12-02 17:46:57 +01:00
Fabian Nack
dc658f8be0 boards - msbiot: prepare msbiot for new cc110x driver 2014-12-01 17:14:09 +01:00
Oleg Hahm
d92e9af91c doc: fixed broken param descriptions 2014-11-30 22:34:50 +01:00
Oleg Hahm
953a21b7a5 doc: remove doxygen duplication 2014-11-30 21:46:31 +01:00
Oleg Hahm
f8ecbf2a0a doc: add to group instead of redefining 2014-11-30 21:45:24 +01:00
Oleg Hahm
fc7606a94b doc: use doxygen li tags 2014-11-30 21:39:53 +01:00
Oleg Hahm
c5395342dc doc: use @false instead of 0 2014-11-30 21:36:04 +01:00
Oleg Hahm
df9c09d946 doc: fixed typos and other misspellings 2014-11-30 21:32:12 +01:00