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

2268 Commits

Author SHA1 Message Date
smlng
77250f89a3 cc2538: disable l2 ack recv irq 2016-09-27 15:04:39 +02:00
Peter Kietzmann
436ff13c1c Merge pull request #5804 from aeneby/no_mutex_lock
cpu/cc2538: Remove superfluous mutex lock
2016-09-26 10:46:39 +02:00
Oleg Hahm
63615157ef Merge pull request #5819 from makomi/stm32l1
cpu/stm32l1: uart: suppress cppcheck nullPointer errors
2016-09-23 20:15:50 +02:00
Oleg Hahm
797ab580c8 Merge pull request #5818 from makomi/stm32f3
cpu/stm32f3: uart: suppress cppcheck nullPointer errors
2016-09-23 20:13:29 +02:00
Oleg Hahm
50215e9b5d Merge pull request #5817 from makomi/stm32f0
cpu/stm32f0: uart: suppress cppcheck nullPointer errors
2016-09-23 19:50:31 +02:00
Oleg Hahm
ed3aa6c46e Merge pull request #5835 from mali/timer
cpu/atmega_common: fix timer_set_absolute return code
2016-09-23 19:35:22 +02:00
0e45604765 Merge pull request #5743 from keestux/refactor-samd21
Refactor samd21
2016-09-22 14:54:57 +02:00
b2b42c7b71 Merge pull request #5451 from mali/uno
boards: add arduino uno and duemilanove support
2016-09-22 09:29:49 +02:00
Ludwig Knüpfer
6d30ced410 Merge pull request #5763 from jthacker/avr_thread_arch_isr_stack_usage
atmega: use software interrupt for context swap
2016-09-21 21:13:05 +02:00
Kees Bakker
d367090c44 cpu/sam21_common: remove define of LITTLE_ENDIAN
This define conflicts with LITTLE_ENDIAN defined in
include/machine/endian.h which is part of gcc-arm-none-eabi.

Also, the define does not seem to be used by the ASF included files.
2016-09-21 20:44:38 +02:00
Kees Bakker
e118525731 cpu/sam21_common: add C++ wrapper to sam0.h 2016-09-21 20:40:49 +02:00
Kees Bakker
1b307b3802 cpu/sam21_common: eliminate trailing white space in CMSIS include files 2016-09-21 20:40:28 +02:00
Kees Bakker
ea8b90fa5f cpu/samd21: uart: now using padd setting from board config
Notice the extra fields in uart_conf_t for rx_pad and tx_pad.
2016-09-21 20:34:22 +02:00
Kees Bakker
845ef0decd cpu/samd21: Refactor spi using ArduinoCore as example
The pinmux is now part of the board config. The pad setting is done with
clear names instead of numbers.
2016-09-21 20:34:22 +02:00
Kees Bakker
f794bd4c8e cpu/samd21: spi: change #ifdef's to #if's
The board config can define SPI_1_EN as 0, and in that case #ifdef won't
work.

Add some more comments, and fix typos.
2016-09-21 20:34:22 +02:00
Kees Bakker
574b565e2a cpu/samd21: add helper functions spi_power_on/off 2016-09-21 20:34:22 +02:00
Kees Bakker
2a4655b6f8 cpu/samd21: rewrite i2c_init_master to make use of gpio_init_sercom
The former i2c_init_master was too complicated. It was trying to set IN/OUT
mode of the pins, but all that is needed is to set the proper MUX.

Also the configuration for the boards was incomplete (no MUX, no pad
setting).

It was tested on a SODAQ Autonomo, but not on a samr21-xpro
2016-09-21 20:34:22 +02:00
Kees Bakker
be1113fa6c cpu/sam21_common: move i2c.c from samd21 to sam21_common
Notice that saml21 does not use I2C (yet).
2016-09-21 20:34:22 +02:00
Kees Bakker
4ad3313ae5 cpu/sam21_common: add a few typedefs for SERCOM
A generic function is added to initialize a SERCOM.

Notice that uart_conf_t was expanded with pad settings, but it isn't used
yet.
2016-09-21 20:34:21 +02:00
Kees Bakker
8644b5f7a0 cpu/samd21: introduce sam0.h so that we can select samr21.h or other
In the Makefile.include of the board it is required to set the correct
define.

Currently only SAMRG18A is supported, as required by samr21-xpro.
2016-09-21 19:43:30 +02:00
Kees Bakker
88e84f68ff cpu/sam21_common: update ASF CMSIS (samr21) include files using ASF 3.21
Notice that RIOT was using FDPLL96M, which is indeed the name in the
datasheet. But Atmel is using GCLK_GENCTRL_SRC_FDPLL.
2016-09-21 19:43:30 +02:00
Kees Bakker
2869d7729d cpu/samr21: rename ASF include files to prepare for ASF update 2016-09-21 19:43:30 +02:00
Joakim Nohlgård
6be334b4f4 Merge pull request #5833 from immesys/fix-i2c-checks
samd21: i2c: check all busstate bits
2016-09-20 10:06:40 +02:00
Michael Andersen
e367ab93f6 samd21: i2c: improve busstate comparison 2016-09-19 10:54:17 -07:00
Matthias Kolja Miehl
c5cfacebc3 cpu/stm32l1: uart: make sure 'dev' is != NULL to avoid nullPointer errors 2016-09-13 22:22:48 +02:00
Martine Lenders
8a74475e70 Merge pull request #5761 from mali/rmdeadcode
boards/atmega_common: remove dead code on link
2016-09-12 17:01:15 +02:00
Martine Lenders
03fbe9c2a5 Merge pull request #5766 from zhuoshuguo/fix_cpu_atmega_header_include_guards
fix cpu/atmega header include guardes.
2016-09-12 17:00:56 +02:00
Matthias Kolja Miehl
0bb7050c60 cpu/stm32f3: uart: make sure that 'port' and 'dev' are !=NULL
This fixes some cppcheck nullPointer errors.
2016-09-11 17:19:59 +02:00
Matthias Kolja Miehl
2ba795eb81 cpu/stm32f0: uart: make sure that 'port' and 'dev' are !=NULL
This fixes some cppcheck nullPointer errors.
2016-09-11 16:56:35 +02: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
Michael Andersen
082d8e85a9 samd21: i2c: clear timeout_counter
If not cleared, long writes timeout incorrectly
2016-09-07 18:21:38 -07:00
Jon Thacker
e0365e0bf9 atmega: use software interrupt for context swap
Fixes #5745
For AVR based boards, three defines must be defined AVR_CONTEXT_SWAP_INIT,
AVR_CONTEXT_SWAP_INTERRUPT_VECT, and AVR_CONTEXT_SWAP_TRIGGER.
These defines are used to trigger a software interrupt used for context
switching.

When AVR_CONTEXT_SWAP_INTERRUPT_VECT is handled, the scheduler is run
and a context swap will happen if necessary, with the resulting thread
starting following the reti instruction. This results in threads running
at normal priority instead of at interrupt priority.

Atmega devices do provide a pure software interrupt. The method used
here for waspmote-pro and arduino-mega2560 is to use pin change
interrupts, set the pin to act as an output, and toggle the value to
simulate a software interrupt. The main limitation here is that a
physical pin is now occupied and must be defined for each board
supported by RIOT. On the plus side, it provides an easy method for
detecting context swaps with an oscilloscope.
2016-09-07 14:35:53 -05:00
Aaron Sowry
2ba43d560f cpu/cc2538: Remove superfluous mutex lock 2016-09-04 20:51:51 +12:00
Oleg Hahm
908f5489b6 Merge pull request #5653 from aeneby/rssi_lqi_fix_v2
cpu/cc2538: Make ED and LQI values 802.15.4 compliant
2016-09-04 10:27:02 +02:00
Laurent Navet
3f0e1862a8 cpu/atmega328p: add atmega328p mcu support
add atmega328p support with:
uart, timer, spi and gpio
2016-09-02 22:26:19 +02:00
Shuguo Zhuo
db3a349a51 cpu/atmega: revised header include guards. 2016-09-01 18:32:17 +02:00
26e4004de4 Merge pull request #5397 from OTAkeys/pr/stm32f2xx
cpu: add stm32f2xx family support (based on #4497)
2016-08-31 21:14:37 +02:00
kYc0o
5e3747ea8b Merge pull request #5590 from mali/atmega_common
cpu/atmega_common: improve to add smaller atmega MCUs.
2016-08-31 18:29:53 +02:00
BytesGalore
c34e9d268c Merge pull request #5785 from x3ro/fix-mci-driver-timer-issue
lpc2387: Fix wrong factor in driver poll-timer
2016-08-30 21:09:17 +02:00
Peter Kietzmann
28638bea92 Merge pull request #5725 from aeneby/tx_underrun_fix
cpu/cc2538: wait for ongoing transmission before flushing TX FIFO
2016-08-30 21:07:14 +02:00
Lucas Jenss
1cf1f59ca9 lpc2378: Fix wrong factor in driver poll-timer
Fixes #4530
2016-08-30 19:59:34 +02:00
Joakim Nohlgård
455fb6cd4d Merge pull request #5742 from kaspar030/fix_lto
LTO fixes
2016-08-29 19:00:09 +02:00
d1198b489d cpu: k60: rename vector.c -> vectors.c, add to SRC_NOLTO 2016-08-29 17:29:53 +02:00
76fc7a56c9 cpu: kw2x: rename vector.c -> vectors.c, add to SRC_NOLTO 2016-08-29 17:29:45 +02:00
5ab97fe38b cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
5a03f08f91 cpu: cortexm_common: compile thread_arch.c without LTO 2016-08-29 13:30:17 +02:00
0bd2805b0c cpu: cortexm_common: explicitly define isr_pendsv and isr_svc 2016-08-29 13:30:17 +02:00
Aaron Sowry
5f71cc82fb cpu/cc2538: wait for ongoing transmission before flushing TX FIFO 2016-08-25 21:25:11 +12:00
Jon Thacker
0cc65db1b2 cpu/atmega_common: Add support for double speed baud generator
* Add support for U2X switch to double transmission speed
* Provides lower error rates when needed
* Add support for static baud rate calculation, reduces computation by 10x
* adds support for statically enabling double speed baud
2016-08-20 08:49:30 -05: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