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

458 Commits

Author SHA1 Message Date
Benjamin Valentin
c5f6a5c6f5 cpu/sam0_common: PWM: prepare for TC timers as PWM source 2020-07-19 01:38:15 +02:00
Benjamin Valentin
a96e5666b4 cpu/sam0_common: PWM: fix doxygen group 2020-07-19 01:38:15 +02:00
Benjamin Valentin
48340f971f cpu/sam0_common: flashpage: clean up helper function 2020-07-14 20:50:50 +02:00
benpicco
30ebabb84e
Merge pull request #14007 from benpicco/cpu/sam0_common-pwm
cpu/sam0_common: move PWM to common code, add support for saml21, samd5x
2020-07-09 10:01:08 +02:00
Benjamin Valentin
bce7d25f10 cpu/sam0_common: add PWM support for saml2x, samd5x 2020-07-08 21:51:12 +02:00
Francisco
325b7a8d8e
Merge pull request #13631 from benpicco/cpu/sam0_common/spi-deinit
drivers/periph/spi: add periph_spi_reconfigure feature & implementation for sam0
2020-06-30 15:34:53 +02:00
Francisco
48bdd7018a
Merge pull request #14302 from fjmolinas/pr_sam0_rtt_opt
cpu/sam0_common/rt%: use READREQUEST when accessing CLOCK/COUNT regs
2020-06-24 08:42:03 +02:00
Bas Stottelaar
6774f7e412
Merge pull request #14337 from benpicco/TIMER_CHANNEL_NUMOF
use TIMER_CHANNEL_NUMOF instead of TIMER_CHANNELS
2020-06-24 01:19:17 +02:00
Benjamin Valentin
c8ff026640 cpu/sam0_common: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
Francisco
a73b61e30b
Merge pull request #14320 from benpicco/cpu/sam0_common-gpio_gclk
cpu/sam0_common: GPIO always default to MAIN clock for EXTI, make configurable
2020-06-23 22:48:45 +02:00
Benjamin Valentin
3e91914831 cpu/sam0_common: spi: implement the periph_spi_reconfigure feature 2020-06-21 21:19:17 +02:00
Francisco Molina
bdda25c534
cpu/sam0_common/rt%: issue READREQUEST to access CLOCK/COUNT regs
read-synchronized register will stall immediatly when read, instead
issue READREQUEST and wait for sync to be unset.
2020-06-19 14:10:31 +02:00
Benjamin Valentin
c0203ad35c cpu/sam0_common: GPIO default to MAIN clock for EXTI, make configurable
Currently only samd21 used the 32 kHz clock for EXTI which makes it miss fast events.
All newer members of the family use the MAIN clock.

While touching this, also make the clock source configurable to this can be overwritten,
e.g. in the board config if desired.
2020-06-19 13:27:48 +02:00
Francisco
a970163812
Merge pull request #14312 from benpicco/cpu/sam0_common/periph/uart-rxonly
cpu/sam0_common: UART: allow RX only configuration
2020-06-19 11:44:10 +02:00
benpicco
c3314e1a0c
Merge pull request #14303 from fjmolinas/pr_sam0_unified_rtt
cpu/sam0: unified rtt configuration
2020-06-19 11:30:06 +02:00
Francisco Molina
ff24aa61f3
cpu/sam0_common/periph/rtt: uncrustify 2020-06-19 09:16:24 +02:00
Francisco Molina
15bbd95b6a
cpu/sam0_common/rtt: add configurable RTT_FREQUENCY 2020-06-19 09:16:24 +02:00
Benjamin Valentin
5c3ae77df9 cpu/sam0_common: UART: allow RX only configuration 2020-06-19 00:33:50 +02:00
Dylan Laduranty
6bf0a41399
Merge pull request #13600 from benpicco/sam0-gpio
cpu/sam0_common: GPIO IRQ optimizations
2020-06-17 21:23:19 +02:00
07c78efc83
Merge pull request #14285 from fjmolinas/pr_uart_nb_race
sam0/stm32: fix possible uart_nonblocking deadlock
2020-06-17 12:14:25 +02:00
Francisco Molina
80d682becd
cpu/sam0: avoid deadlock on nonblocking write
If a write to a full tsrb is attempted with disabled interrupts
or in a interrupt then a deadlock will occure. To avoid this make
space in the ringbuffer by synchronously writing to uart.
2020-06-17 10:01:21 +02:00
Francisco Molina
0b8adb2d27
cpu/sam0-stm32/uart: rename tx buf size to UART_TXBUF_SIZE 2020-06-17 10:01:20 +02:00
Benjamin Valentin
585dc15f99 cpu/sam0_common: UART: implement inverted RX & TX
The UART TX and TX lines on SAMD5x and SAML1x can be inverted.
However, the flags don't do exactly what one would expect.

See errata 2.18.5: SERCOM-UART: TXINV and RXINV Bits Reference:

> The TXINV and RXINV bits in the CTRLA register have inverted functionality.
>
> Workaround:
> In software interpret the TXINV bit as a functionality of RXINV, and conversely,
> interpret the RXINV bit as a functionality of TXINV.
2020-06-16 22:55:37 +02:00
benpicco
1992f57765
Merge pull request #14261 from bergzand/pr/sam0_common/spi_dma
sam0_common: Make SPI peripheral DMA compatible
2020-06-14 18:25:37 +02:00
60f4502e6c
cpu/sam0_common: Make SPI peripheral DMA compatible 2020-06-14 14:56:20 +02:00
22c8788b58
sam0_common/dma: Rename len to num 2020-06-14 11:51:36 +02:00
02b2b58358
sam0_common: Add additional documentation on DMA usage 2020-06-14 11:48:43 +02:00
7a8566c391
sam0_common/dma: Mark src parameter as const 2020-06-13 21:02:04 +02:00
benpicco
74299a2b03
Merge pull request #14260 from bergzand/pr/sam0_common/dma_periph
sam0_common: Add DMA peripheral driver
2020-06-12 21:18:31 +02:00
73c8911e62
cpu/samd5x: Add DMA peripheral to init 2020-06-12 20:04:05 +02:00
6be1b27bbb
sam0_common: Add DMA peripheral driver 2020-06-12 20:04:05 +02:00
Benjamin Valentin
54b57bd97f cpu/sam0_common: drop prescaler from timer config
since c05984b341 the prescaler in the timer
config struct is no longer used.

Let's remove it.
2020-06-11 19:29:43 +02:00
Benjamin Valentin
824f7aa82b cpu/sam0_common: move PWM to common code 2020-06-07 16:50:17 +02:00
Leandro Lanzieri
67a43e0ada
drivers/wdt/kconfig: Rename HAS_WDT_WARNING_PERIOD
The symbol now is HAS_PERIPH_WDT_WARNING_PERIOD.
2020-06-02 17:43:19 +02:00
Leandro Lanzieri
079a7ee1e5
cpu/sam0_common: Add family specific Kconfig symbols 2020-06-02 17:42:10 +02:00
Leandro Lanzieri
48759eccdc
drivers/wdt: Add feature to indicate a configurable warning period
This adds the feature `periph_wdt_warning_period` that indicates that a
platform WDT driver implementation supports a configurable
CONFIG_WDT_WARNING_PERIOD.
2020-06-02 12:54:25 +02:00
Leandro Lanzieri
12470f0ed2
cpu/sam0_common: Move periph_timer_periodic feature to Makefile.features 2020-05-29 11:13:59 +02:00
Benjamin Valentin
8486e8c6d1 cpu/sam0_common: implement timer_set_periodic() 2020-05-28 17:37:42 +02:00
Benjamin Valentin
ec7ae668e2 cpu/sam0_common: define TIMER_CHANNELS 2020-05-28 13:24:06 +02:00
Juergen Fitschen
df90176b1f cpu/sam0_common/spi: move clk pin muxing into spi_acquire / spi_release
When the SPI peripheral is disabled, the output lines will become HIGH-Z.
If the clk pin is not pulled HIGH or LOW, connected SPI slaves will start drawing current expectedly.
2020-05-23 13:54:39 +02:00
Benjamin Valentin
5481d8c73a cpu/sam0_common: clean up formatting
Make the code nicer to read.
2020-05-06 14:11:47 +02:00
Benjamin Valentin
e93c9a82f1 cpu/sam0_common: RTC INTFLAG are clear on write
Writing a 1 bit clears the interrupt flag, writing with |= is thus
uneccecary (and actually an error as this would clear *all* flags).

This cleanup was already done for rtt.c, but rtc.c missed out.
2020-05-06 14:05:12 +02:00
Francisco
cea0d1c532
Merge pull request #13421 from benpicco/cpu/sam0_common/i2c-deinit
drivers/periph/i2c: add periph_i2c_reconfigure feature & implementation for sam0
2020-05-05 19:09:47 +02:00
Benjamin Valentin
8c502322f4 cpu/sam0_common: i2c: implement the periph_i2c_reconfigure feature
This adds sam0 implementations for

 - i2c_init_pins()
 - i2c_deinit_pins()
 - i2c_pin_sda()
 - i2c_pin_scl()
2020-05-05 16:12:19 +02:00
benpicco
fbae0a1117
Merge pull request #13901 from benpicco/cpu/sam0_common/timer_flex_freq
cpu/sam0_common: timer: don't ignore frequency in timer_init()
2020-05-04 02:56:01 +02:00
Dylan Laduranty
76870721fe
Merge pull request #13965 from benpicco/cpu/sam0_common/periph/dac
cpu/sam0_common: implement periph/dac
2020-05-02 20:34:40 +02:00
Benjamin Valentin
bfb3d52a63 cpu/sam0_common: implement periph/dac
The sam0 MCUs all have a DAC peripheral.
The DAC has a resulution of 10 or 12 bits and can have one or two
output channels.

The output pins are always hard-wired to PA2 for DAC0 and PA5 for DAC1
if it exists.

On the same54-xpro I would only get a max value of ~1V when using the
internal reference, so I configured it to use an external voltage reference.

The external reference pin is hard-wired to PA3, so you'll have to connect
that to 3.3V to get results.
2020-05-02 18:31:55 +02:00
Benjamin Valentin
c05984b341 cpu/sam0_common: timer: don't ignore frequency in timer_init()
Now that we can query the GCLK frequency at run-time, there is no need
to implicitely hard-code the timer frequency in the config struct anymore.
2020-05-01 16:44:06 +02:00
fe299138aa
sam0_common: clarify memcpy in cpuid_get 2020-04-28 14:56:19 +02:00
Benjamin Valentin
5d123cbb22 cpu/sam0_common: distribute PM_NUM_MODES among siblings
Also adapt the defines to the documentation

 - CPUs define up to 4 power modes (from zero, the lowest power mode,
   to PM_NUM_MODES-1, the highest)
 - >> there is an implicit extra idle mode (which has the number PM_NUM_MODES) <<

Previously on saml21 this would always generate pm_set(3) which is an illegal state.
Now pm_layered will correctly generate pm_set(2) for IDLE modes.

Idle power consumption dropped from 750µA to 368µA and wake-up from standby is also
possible. (Before it would just enter STANDBY again as the mode register was never
written with the illegal value.)
2020-04-01 18:10:23 +02:00
Dylan Laduranty
6bba4188fc
Merge pull request #13764 from benpicco/cpu/saml11/use_buck_converter
cpu/saml1x: select buck voltage regulator when possible
2020-04-01 14:47:47 +02:00
Leandro Lanzieri
64552a3b9a
cpu/cortexm_common: Move common modules to Makefile.dep
This moves the following modules to a architecture-specific Makefile.dep
file:
- cortexm_common
- cortexm_common_periph
- newlib
- newlib_nano
- periph
2020-04-01 09:46:21 +02:00
Benjamin Valentin
895eb943d8 cpu/sam0_common: add cpu_pm_cb_enter()/leave()
This allows to implement needed work-arounds surrounding sleep on
a per-MCU basis.
2020-03-31 17:18:58 +02:00
Benjamin Valentin
9b90fd478a cpu/sam0_common: provide function to switch voltage regulator
Add a fucntion to switch between LDO and Buck concerter to provide the
internal CPU voltage.
The Buck Converter is not compatible with internal fast oscillators (DFLL, DPLL)
and requires an inductivity to be present on the board.
2020-03-31 17:18:20 +02:00
Francisco
1a8b35f54b
Merge pull request #13377 from leandrolanzieri/pr/kconfig_migrate/drivers/periph_wdt
drivers/periph/wdt: Expose configurations to Kconfig
2020-03-31 16:36:36 +02:00
Dylan Laduranty
783ffdc28a
Merge pull request #13607 from benpicco/cpu/sam0_common/generic_RAM_ROM
cpu/sam0_common: derive ROM_LEN & RAM_LEN from part number
2020-03-31 15:55:04 +02:00
Leandro Lanzieri
cf53a86308
cpu/sam0_common: Add CPU-specific WDT peripheral configuration 2020-03-31 13:39:39 +02:00
Leandro Lanzieri
00b71a2708
drivers/wdt: Move WDT_WARNING_PERIOD to 'CONFIG_' namespace 2020-03-31 13:39:37 +02:00
Benjamin Valentin
77961106f9 cpu/sam0_common: derive ROM_LEN, RAM_LEN from part number & vendor file
The ROM size is encoded in the part number of the Atmel SAM chips.
RAM size is not encoded directly, so get it by parsing the chip's vendor file.

The file remains in the page cache for the compiler to use, so the overhead
should be minimal:

on master:

  Benchmark #1: make BOARD=samr21-xpro -j
    Time (mean ± σ):     527.9 ms ±   4.9 ms    [User: 503.1 ms, System: 69.6 ms]
    Range (min … max):   519.7 ms … 537.2 ms    10 runs

with this patch:

  Benchmark #1: make BOARD=samr21-xpro -j
    Time (mean ± σ):     535.6 ms ±   4.0 ms    [User: 507.6 ms, System: 75.1 ms]
    Range (min … max):   530.6 ms … 542.0 ms    10 runs
2020-03-25 15:07:50 +01:00
79431878ac
Merge pull request #13051 from dylad/pr/uart_hw_fc
cpu/uart: create common uart hw fc module
2020-03-10 16:41:36 +01:00
Dylan Laduranty
7a095a80d7 cpu/sam0: use generic hw fc module 2020-03-10 14:22:34 +01:00
benpicco
741b9d3b2d
Merge pull request #13603 from ML-PA-Consulting-GmbH/samd21j17d_add
cpu/sam0_common: add samd21j17d
2020-03-10 12:00:25 +01:00
Benjamin Valentin
eb3f515f55 cpu/sam0_common: gpio: Make use of dedicated GPIO interrupts
saml1x and samd5x have dedicated interrupts per GPIO line.
Use those instead of iterating over the GPIO status bits
to serve IRQs even faster.
2020-03-10 10:33:31 +01:00
Alexandre Moguilevski
648a5b9c58 cpu/sam0_common: add samd21j17d 2020-03-10 10:26:45 +01:00
Benjamin Valentin
5c4c45fd3f cpu/sam0_common: gpio: add gpio_disable_mux() function
Inverse to gpio_init_mux()
2020-03-09 19:23:33 +01:00
Benjamin Valentin
6540609c35 cpu/sam0_common: gpio: save a few cycles in isr_eic()
Don't iterate over all bits in the GPIO status register, instead
just loop as many times as there are set bits.
2020-03-09 18:34:06 +01:00
Juergen Fitschen
0032d35fe8 cpu/sam0_common: mitigate rounding errors of baud rate calculation
Instead of always rounding up, the driver now rounds to the nearest integer. This reduces the absolut rounding error when setting SPI baud rates.
2020-03-03 12:32:42 +01:00
benpicco
0edfd13df0
Merge pull request #13310 from benpicco/sam0-exti-common
cpu/sam0_common: use generic exti_config
2020-02-26 08:40:49 +01:00
Benjamin Valentin
a0ac2384ac cpu/sam0_common: samr30: add integer literal macros
All the more recent vendor files have them, so include them for samr30 too.
It is expected for this to become obsolete with the next vendor file update.
2020-02-25 21:52:24 +01:00
Gunar Schorcht
f688f84a15
Merge pull request #12928 from benpicco/newlib-multiheap
sys/newlib: enable multiple heaps in _sbrk_r()
2020-02-25 19:16:42 +01:00
Benjamin Valentin
442ddc1346 cpu/samd21: Switch EIC clock to slow speed on STANDBY mode 2020-02-24 12:02:27 +01:00
Juergen Fitschen
43ff72ad56 cpu/sam0*: Switch EIC clock to slow speed on STANDBY mode 2020-02-24 12:02:25 +01:00
Juergen Fitschen
1265efc785 cpu/sam0*: Wrap cortexm_sleep call 2020-02-24 11:48:13 +01:00
Benjamin Valentin
b77afadb49 cpu/sam0_common/gpio: use explicit GCLK names
For consistency, use named GCLKs.

 - `SAM0_GCLK_32KHZ` will always be 2 for samd21
 - `SAM0_GCLK_MAIN` will always be 0

So no change in functionality, just makes the code easier to understand.
2020-02-21 14:25:43 +01:00
Benjamin Valentin
cfd0ef415e cpu/sam0_common: hook up low power RAM as extra heap
This enables unused low-lower RAM on saml21/samd5x to be used for
heap memory.
2020-02-20 17:11:25 +01:00
Benjamin Valentin
fd9a247200 cpu/sam0_common: use generic exti_config
Creating an `exti_config` array for a new MCU manually is tedious and error prone.
Luckiely all information is already availiable in the vendor files.

Credit for this discovery & method goes to @Sizurka

The file was generated with

```C

int main(void) {
        puts("static const int8_t exti_config[PORT_GROUPS][32] = {");

        for (unsigned port = 1; port < 5; ++port) {
                printf("#if PORT_GROUPS >= %d\n{\n", port);
                for (unsigned pin = 0; pin < 32; ++pin) {
                        printf("#ifdef PIN_P%c%02uA_EIC_EXTINT_NUM\n", '@' + port, pin);
                        printf("    PIN_P%c%02uA_EIC_EXTINT_NUM,\n", '@' + port, pin);
                        printf("#else\n    -1,\n#endif\n");
                }
                printf("},\n#endif\n\n");
        }

        puts("};");

        return 0;
}
```

No changes in generated code are expected, but this makes adding new members
of the sam0 CPU families much easier.
2020-02-20 11:23:51 +01:00
Benjamin Valentin
93d536f761 cpu/sam0_common: samr30 add PIN_(.*)_EIC_EXTINT_NUM to vendor header
samr30 is the only MCU of this family where the vendor files do not
define the PIN_($pin)_EIC_EXTINT_NUM macro yet.

This macro is needed to create a generic EXTI configuration for all
sam0 MCUs.

The defines were generated with

    sed -Ei '/define PIN_(.*)_EIC_EXTINT([0-9]*)/
            {h; x;
             s/define PIN_(.*)A_EIC_EXTINT([0-9]*)(.*)/
               define PIN_\1A_EIC_EXTINT_NUM       _L_\(\2\)
               \/**< \brief EIC signal: PIN_\1 External Interrupt Line *\/
              /g; G}' samr30g18a.h samr30e18a.h
2020-02-18 18:28:10 +01:00
Dylan Laduranty
cc17d3c2ba
Merge pull request #13350 from benpicco/saml21-asf
cpu/sam0_common: update saml21 vendor files to version 1.2.125
2020-02-12 14:27:39 +01:00
Benjamin Valentin
1333a5698c cpu/sam0_common: update saml21 vendor files to version 1.2.125
This release adds EXTINT defines compatible with later versions of
the sam0 series of MCUs.
2020-02-12 11:46:36 +01:00
Benjamin Valentin
e03780c8ca cpu/sam0_common: update samd21 vendor files to version 1.3.395
This release adds EXTINT defines compatible with later versions of
the sam0 series of MCUs.
2020-02-08 03:28:14 +01:00
Dylan Laduranty
b5bb846d3a
Merge pull request #13312 from benpicco/cpu/sam0-vendor_cleanup
cpu/sam0_common: use vendor provided MCU header dispatch
2020-02-07 20:33:45 +01:00
Benjamin Valentin
b0078b1a98 cpu/sam0_common: update samr21 vendor files to version 1.1.72
This release adds EXTINT defines compatible with later versions of
the sam0 series of MCUs.
2020-02-07 12:14:45 +01:00
Benjamin Valentin
bd1953dd80 cpu/sam0_common: use vendor files to dispatch MCU headers
Instead of manually re-creating the files from ASF, just use
the vendor provided dispatch headers and ease the maintainance
burden.
2020-02-06 19:52:05 +01:00
Benjamin Valentin
fd793b8917 cpu/samd51: add common header file from ASF
Somehow I forgot to commit this.
2020-02-06 19:49:50 +01:00
benpicco
9b33e1ca92
Merge pull request #13271 from kfessel/patch-shed
core/sched: sched.h: remove not needed bitarithm include to avoid conflict
2020-02-05 14:44:08 +01:00
Karl Fessel
4445faaa3a core/shed: remove not needed bitarithm include add missing
bitarithm.h is not needed for the interface of shed but may cause conflicts
due to different definitions of SETBIT and CLRBIT

common implementations are: (value, offset) xor (value, mask) bitarithm
implements the later

frac.c and nrf52/usbdev.c use bitarithm.h but where missing the include

sam0/rtt.c defined a bit using mask from bitarithm,
changed that to the soulution used in sam0/rtc.c
2020-02-05 12:45:29 +01:00
Benjamin Valentin
38b6ee56f3 cpu/sam0: use defines for GCLK IDs
Give the clocks explicit names to better identify their meaning.
2020-02-04 21:16:54 +01:00
Benjamin Valentin
df33ffd0d3 cpu/samd21: only configure one 32kHz GCLK
Use the same 32 kHz GCLK to feed the PLL and the RTT, etc.
2020-02-04 21:16:54 +01:00
Benjamin Valentin
1496149bba cpu/sam0: don't hard-code peripheral clocks
Instead of hard-coding the peripheral clocks to CLOCK_CORECLOCK
introduce helper functions to return the frequency of the individual
GCLKs and use those for baud-rate calculations.

This requires the GCLK to be part of the peripheral's config struct.
While this is already the case for most peripherals, this also adds
it for those where it wasn't used before.

As it defaults to 0 (CLOCK_CORECLOCK) no change is to be expected.
2020-02-04 21:06:21 +01:00
Benjamin Valentin
a51d167a43 cpu/sam0: use GCLK ID instead of bitmask
To simplify board definitions and for unification between samd2x and
newer models, don't use the GCLK bitmask in board definitions.
Instead use the GCLK index and generate the bitmask when needed.
2020-02-04 21:06:21 +01:00
Martine Lenders
8d749dc024
Merge pull request #13148 from chrysn-pull-requests/usb-default-vidpid
USB: Use default VID/PID for RIOT-included peripherals
2020-01-30 17:37:52 +01:00
chrysn
e65f3f372b USB VID/PID: Set whitelist define for internals that use usb.h
This list is probably incomplete as it was created experimentally.
2020-01-30 15:04:10 +01:00
925445d0ff
cpu/sam0: factorize dependencies in Makefile.dep 2020-01-28 13:18:39 +01:00
Marian Buschsieweke
47cb59e6e5
cpu/sam0_common/periph: adc_sample() now returns int32_t 2020-01-10 14:13:15 +01:00
dylad
bd06772980 sam0/uart: add support for hardware flow control 2019-12-20 21:19:44 +01:00
dylad
f44d9f88f0 sam0/uart: remove useless read-modify-write op 2019-12-10 20:19:34 +01:00
Dylan Laduranty
6a4259e48a
Merge pull request #12064 from benpicco/sam0-buffered_uart
cpu/sam0_common/periph/uart: implement non-blocking write
2019-11-28 10:07:11 +01:00
83215befd9
sam0: change ADC periph to return -1 on wrong resolution
The common ADC API dictates that a sample call must return -1 on an
incorrect resolution. The sam0 ADC implementation instead threw an
assertion failure.
2019-11-27 21:09:02 +01:00
7d2e10335d
sam0: remove duplicate _done() call 2019-11-27 21:08:28 +01:00
Dylan Laduranty
5287e1c052
Merge pull request #12782 from ML-PA-Consulting-GmbH/fix/20191122__sam0common_spi_release
cpu/sam0_common/periph/spi: power off spi bus on release
2019-11-27 19:13:19 +01:00
Benjamin Valentin
0d977b3b3c cpu/sam0_common/periph/uart: implement buffered write
Implement interrupt based uart_write() using a tsrb for the TX buffer.

To enable it, add

    USEMODULE += periph_uart_nonblocking

to your Makefile.
2019-11-27 19:01:00 +01:00
Daniel Lockau
5ea4fcd9c8 cpu/sam0_common/periph/spi: uncrustify 2019-11-27 07:16:22 +01:00
Daniel Lockau
c5ad13cb18 cpu/sam0_common/periph/spi: power off spi bus on release 2019-11-27 07:16:22 +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
Yegor Yefremov
f2127391c4 doxygen/UART: don't include overridden typedefs
Add missing #ifndefs to overridden UART typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:44:52 +01:00
Yegor Yefremov
df7e760588 doxygen/I2C: don't include overridden typedefs
Add missing #ifndefs to overridden I2C typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
fa3b0ff04b doxygen/SPI: don't include overridden typedefs
Add missing #ifndefs to overridden SPI typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Kees Bakker
43670aee7b
Merge pull request #12615 from benpicco/samd21-1kHz_gclk
cpu/samd21: use dedicated 1kHz GCLK4 for RTC and WDT
2019-11-13 20:25:55 +01:00
Dylan Laduranty
0e736b8879
Merge pull request #12675 from benpicco/sam0-rtt-fix
cpu/sam0_common: rtt: enable COUNTSYNC in CTRLA
2019-11-13 10:12:07 +01:00
Benjamin Valentin
d21dc25cfe sam0/spi: Don't re-configure SPI device when not needed
Currently, spi_acquire() will always re-configure the SPI bus.
If the configuration did not change, this is entirely uneccecary
and makes SPI operations take longer than needed.

Instead, compare the current configuration with the new configuration
and skip the initialisation if it didn't change since the last call.
2019-11-12 11:31:41 +01:00
Benjamin Valentin
db2fa33660 sam0_common: rtc: use GCLK4 on SAMD21
The RTC expects to be clocked from a 1kHz source.
Previously it would re-configure GCLK2 from 32kHz to 1kHz when used.

Since GCLK2 is also used by EIC, this would break external interrupts
in strange and unexpected ways.

Dedicate a 1kHz clock to it to avoid the damage.
2019-11-12 11:30:02 +01:00
Benjamin Valentin
5fa234e435 sam0_common: wdt: use GCLK4 on SAMD21
GCLK4 will always run at 1kHz on SAMD21, so use it directly.
2019-11-12 11:29:25 +01:00
Benjamin Valentin
89b987494e cpu/sam0_common: rtt: enable COUNTSYNC in CTRLA
From the data sheet:

> The COUNT register requires synchronization when reading.
> Disabling the synchronization will prevent reading valid
> values from the COUNT register.

Without this bit enabled, rtt_get_counter() will always return 0.
2019-11-12 11:28:08 +01:00
1c416185b6
cpu/sam0_common: fix potential undefined result with sercom_id
Scan-build detected that sercom_id could return -1 and the value of this function is affected to uint8_t variables. Since these variables are used for shitfing bit in registers, this could lead to undefined behavior
2019-10-27 12:02:47 +01:00
acdb010669
sam0_common/usb: fix typo in comment 2019-10-23 10:35:47 +02:00
Kees Bakker
04c84ed158 cpu/sam0: refactor ADC_0 into plain ADC
This change is for all boards with a sam0 cpu. This cpu just has one ADC.
It is unnecessary to have defines with ADC_0_ prefix as if multiple ADCs
are possible.

Some defines were not used, such as ADC_0_EN, ADC_0_CHANNELS,
ADC_MAX_CHANNELS, ADC_0_CLK_SOURCE, ADC_0_CHANNELS

Change all ADC_0_ prefixes to ADC_
2019-10-03 20:45:44 +02:00
f85edaf82a
Merge pull request #10941 from keestux/update-samr30-vendor
cpu/samr30: update vendor files using ASF 3.35.1
2019-10-02 13:35:06 +02:00
Dylan Laduranty
aed628f08b
Merge pull request #11486 from benpicco/saml21-lpram
cpu/saml21: Make Low-Power SRAM available to programs
2019-10-01 21:02:42 +02:00
Gunar Schorcht
02d81b717e
Merge pull request #12063 from maribu/i2c_release
drivers/periph/i2c: Updated i2c_release() to return void
2019-10-01 19:50:38 +02:00
Benjamin Valentin
c9b827e5d5 sam0_common: export flag that tells if the CPU woke from deep sleep
It is often useful to know whether the CPU was just powered on afresh
or if it was woken from a deep sleep state, e.g. by RTC or GPIO event.
2019-10-01 18:39:40 +02:00
Gaëtan Harter
4b93f27d83
cpu: use makefiles/utils uppercase
Convert the variables to uppercase using the 'makefiles/utils' function.
2019-09-30 17:25:24 +02:00
Benjamin Valentin
7e5aa7e775 cpu/sam0_common: uart: fix baud rate calculation
In fractional mode, 3 bits are used to store the fractional part.
Therefore we must multiply / divide by 8 instead of 10 in order to
get the correct values.
2019-09-27 10:49:43 +02:00
dylad
e189d085b0 cpu/sam0: add support for SAMR34 MCU 2019-09-26 10:48:03 +02:00
dylad
c9bd7deea0 cpu/sam0: add SAMR34 vendor files 2019-09-26 10:48:03 +02:00
Benjamin Valentin
c9f8ff1cf1 sam0_common: add Watchdog implementation 2019-09-20 19:04:41 +02:00
benpicco
d5c272ed86
Merge pull request #12199 from smlng/fix_timer_returns
periph/timer: Fix return codes of timer API
2019-09-17 23:04:46 +02:00
Dylan Laduranty
88fe7afe2b
Merge pull request #12121 from benpicco/sam0-fix_exti
cpu/sam0_common/gpio: don't hard-code number of ports
2019-09-12 20:17:11 +02:00
Benjamin Valentin
b1724a7d1b periph/rtc: normalize struct tm before usage
A naive implementation may set a RTC alarm in 30s by calling

	struct tm now;
	rtc_get_time(&now);
	now.tm_sec += 30;
	rtc_set_alarm(&now, _cb, NULL);

This works for RTC implementations that use a RTT internally and call
mktime() to convert the struct tm to a unix timestamp, as mktime() will
normalize the struct in the process.

Call rtc_tm_normalize() when the RTC uses separate registers for time / date
components to ensure it is normalized.

This also modifies tests/periph_rtc to exercise this case.
2019-09-12 11:32:31 +02:00
Sebastian Meiling
49acf98841 cpu/sam0: adapt timer to return 0 on success
Adapt periph/timer implementation of sam0 based MCUs
to return 0 on success for all functions.
2019-09-11 13:52:28 +02:00
Juan Carrano
f7279c84bb cpu/sam0_common: rtt: correcly clear flags.
The INTFLAGS register is cleared by writing a 1 to the corresponding interrupt
flag bit. From the samr21's manual:

> Writing a zero to this bit has no effect.
> Writing a one to this bit clears the Compare 0 interrupt flag.

This is a common pattern in flag registers.

This RTT driver is using or-equal to clear the flags, which means it can
possibly clear other interrupts. There's a small chance that one event is
missed if it happens very close to another event.

Credits to @benpicco, @dylad for pointing out missing fixes.
2019-09-11 12:55:10 +02:00
Benjamin Valentin
ba8dfc8341 cpu/sam0_common/gpio: don't hard-code number of ports
_exti() always assumes only 2 ports, so it will always fail when using
e.g. port C or port D on same54.

Instead, determine the number of ports from the dimensions of the exti_config
array.
2019-08-29 15:27:42 +02:00
Gaëtan Harter
1be5b7b10b
cpu: do not locally export compilation variables
These are already exported by `makefiles/vars.inc.mk`.
It is a prerequisite to allow handling compilation without global exports.
2019-08-29 10:35:53 +02:00
Marian Buschsieweke
dd56b3bb71
cpu/sam0_common: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Benjamin Valentin
a9b0db3ba4 cpu/sam0_common: add hwrng driver 2019-08-03 14:50:58 +02:00
Kees Bakker
14a836d7a1 cpu/samr30: update vendor files using ASF 3.35.1 2019-07-26 22:03:12 +02:00
Benjamin Valentin
56891fe7f2 cpu/sam0: update doc.txt with new MCU families 2019-07-17 11:37:46 +02:00
Kevin "Bear Puncher" Weiss
a290f2d66c
Merge pull request #11712 from bergzand/pr/sam0_common/uart_modecfg
sam0_common: add uart modecfg support
2019-06-21 13:08:07 +02:00
3241aff71c
sam0_common: add uart modecfg 2019-06-21 10:54:24 +02:00
Benjamin Valentin
7928c74e26 sam0_common: rtc/rtt: don't setup oscilators
leave that to cpu.c
2019-06-18 13:20:04 +02:00
Benjamin Valentin
f375b00ff3 cpu/samd5x: add support for samd5x/same5x MCUs
This adds supoprt for the Atmel SAMD51 & SAME54 SoC.
The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals
with the samd2x Cortex-M0+ and saml1x Cortex-M23 parts.
2019-06-06 16:47:11 +02:00
Benjamin Valentin
3cd119a6e6 cpu/sam0_common: import vendor files for samd51
Atmel Software Framework (ASF) provides a set of low-level header files
that give access to different hardware peripherals of Atmel's ICs.

Origin: Atmel SAMD51 Series Device Support (1.1.96)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAMD51_DFP.1.1.96.atpack
2019-06-06 16:47:11 +02:00
Benjamin Valentin
cb9624909f cpu/sam0_common: import vendor files for same54
Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAME54 Series Device Support (1.0.87)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAME54_DFP.1.0.87.atpack
2019-06-06 16:47:11 +02:00
Benjamin Valentin
f36d54f239 sam0/timer: various fixes
This cleans up the sam0 timer driver:

 - remove the check for the unused freq parameter
 - the MCU provides dedicated SET/CLR registers to avoid
   read-modify-write, so don't do read-modify-write on them.
 - workaround a possible hardware bug on SAMD5x:
   loop until the CMD_READSYNC is really set
2019-06-06 15:38:55 +02:00
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
Benjamin Valentin
7415e0590e sam0_common: spi: use sercom_set_gen() instead of re-implementing it
Don't repeat yourself and introduce errors in doing so.
2019-05-25 19:13:53 +02:00
Benjamin Valentin
84233ce5d5 sam0_common: replace sercom_id() calculation with switch statement
As the sercom_id() function grows it gets more unweidly.
Let's replace it with a simple switch statement that is true for all
sam0 parts.
2019-05-25 19:12:55 +02:00
Benjamin Valentin
31f88a2d0e sam0_common: periph/spi: use sercom_clk_en/dis()
Use already existing functions to turn on / off SERCOM clocks instead
of replicating the functionality in the driver.
2019-05-25 19:09:32 +02:00
Dylan Laduranty
f6ba7ee106 sam0: correct number of PM for SAML10 2019-05-22 17:04:27 +02:00
Benjamin Valentin
849dd4cdce sam0_common: make Timer implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the same
Timer peripheral, yet each of them carries it's own copy of the Timer
driver.

This introduces a new timer driver that is common for all sam0 MCUs and
uses structs for configuration instead of defines.
2019-05-21 11:47:59 +02:00
Benjamin Valentin
077056b949 sam0_common: make RTT implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the
same RTC peripheral, yet each of them carries it's own copy of the RTT
driver.

Unify the drivers and move them to sam0_common.
2019-05-09 20:54:00 +02:00
Benjamin Valentin
9aa8c619c1 sam0_common: make RTC implementation common across all sam0 MCUs
The currently supported SAM0 MCUs (samd21, saml21, saml1x) share the
same RTC peripheral, yet each of them carries it's own copy of the RTC
driver.

Unify the drivers and move them to sam0_common.
2019-04-15 22:25:47 +02:00
Hyungsin
d9c17c2154 boards: add initial hamilton board support 2019-04-03 15:00:35 -07:00
Kevin "Bear Puncher" Weiss
15c2a48fdf
Merge pull request #10839 from dylad/pr/sam0/remove_gclk_slow
cpu/sam0_common: remove unneeded GCLK_SLOW setup in i2c driver
2019-03-28 14:31:16 +01:00
Dylan Laduranty
ccf12c57a8
Merge pull request #10884 from fedepell/sam_rwee_support
sam0 flashpage RWWEE flash support
2019-03-28 11:00:25 +01:00
1286b18ca9
sam0_common: Fix syntax mistake in usbdev driver 2019-03-26 16:09:03 +01:00
d7804823db
sam0_common: Add USB peripheral driver 2019-03-26 10:26:11 +01:00
Federico Pellegrin
5faafac092 sam0 flashpage RWWEE flash support 2019-03-21 04:27:41 +01:00
Martine Lenders
7220b66708
Merge pull request #10936 from miri64/sam0_common/fix/check-adc-numof
sam0_common: check ADC_NUMOF on adc_init()
2019-02-04 16:41:41 +01:00
Kees Bakker
458c95a854
Merge pull request #10914 from keestux/describe-saml1x-source
cpu/sam0_common: update README for SAML1x addition
2019-02-04 16:29:15 +01:00
Martine Lenders
39e90502af sam0_common: check ADC_NUMOF on adc_init() 2019-02-04 09:28:13 +01:00
Kees Bakker
e4325ed802 cpu/sam0_common: update README for SAML1x addition
Rewrite the README to reflect the recent addition of SAMR30 and
SAML10/SAML11.
2019-02-01 23:33:31 +01:00
Federico Pellegrin
318f0cf679 sam0 flashpage: make ready check inline, add wait also after PBC 2019-01-30 04:29:23 +01:00
Federico Pellegrin
409d83e087 sam0 flashpage: minor code style fixes 2019-01-29 20:58:46 +01:00
Federico Pellegrin
051be66b76 sam0 flashpage: wait for READY bit in INTFLAG after write command 2019-01-27 07:39:10 +01:00
Dylan Laduranty
5dd51f2ec5 cpu/sam0_common: remove unneeded GCLK_SLOW setup in i2c driver 2019-01-22 09:29:42 +01:00
Dylan Laduranty
9450fa7dc3 cpu/sam0_common: add support for saml10/saml11
Add SAML10/SAML11 support through SAM0 because hardware IP are the same so reuse to avoid duplication
2019-01-21 17:06:58 +01:00
Federico Pellegrin
b8b8ffd163 sam0 flashpage_write: correct assert for last byte of flash + style 2018-12-21 13:11:38 +01:00
Federico Pellegrin
a0054654ee sam0 flashpage_write: fix writes translation from RIOT to CPU pages 2018-12-19 04:54:44 +01:00
c87f02149e cpu/sam0_common: provide gpio/gpio_irq feature at cpu level 2018-12-17 20:52:48 +01:00
Martine Lenders
95819c660b sam0_common: mark closing #endif for MODULE_PERIPH_GPIO_IRQ 2018-10-09 15:11:00 +02:00
13654a950b cpu/samr30: add support for samr30g18a
Co-authored-by: biboc <bapclenet@gmail.com>
2018-10-01 10:15:08 +02:00
Hauke Petersen
6afd0efdd8 cpu/sam0_common/gpio: use gpio_irq feature 2018-09-21 08:19:31 +02:00
dylad
4e6d3d1f92 sam0/spi: fix SPI mode assignment
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2018-09-04 13:58:51 +02:00
Dylan Laduranty
8871e5aaa6
Merge pull request #9876 from fedepell/sercomid-9875
sam0_common: fix sercom_id return value for SERCOM5 (#9875)
2018-09-04 09:10:06 +02:00
Federico Pellegrin
d3cd2b71c0 sam0_common: fix sercom_id return value for SERCOM5 (#9875) 2018-09-03 18:57:18 +02:00
Federico Pellegrin
bfdafe877e sam0_common: correct sercom_set_gen for sercom5. it assumes SERCOM5 GEN clock is in sequence, but is not, need to put a specific if test 2018-09-02 13:39:08 +02:00
smlng
e39ebb1623 cpu/sam0: add doxygen group around i2c_speed_t 2018-07-25 12:01:40 +02:00
smlng
90f66a1952 cpu/sam0_common/i2c: fix ambiguous reg assignment
The value assigned to the register was unclear due to usage
    of bit-comparison and ternary operator, added parentheses to
    make it explicit.
2018-07-25 12:01:40 +02:00
dylad
e6bd6bfe3b sam0/i2c: update driver to new API 2018-07-25 12:01:34 +02:00
Joakim Nohlgård
28361592ae sam0_common: Adjust ldscript memory segment attributes 2018-05-09 06:49:02 +02:00
Vincent Dupont
a1f482cbf7 cpu/sam0: use const pointer in flashpage 2018-03-14 16:28:33 +01:00
c1e20f8231
Merge pull request #7709 from smlng/cpu/sam0_common/enh_uart
cpu, sam0 common: adapt periph-uart to use read-only bit-fields
2017-12-15 12:45:10 +01:00
smlng
150f3fb231 cpu/sam0_common: fix assert in periph/flashpage 2017-12-10 16:21:52 +01:00
43e972fc61
Merge pull request #7970 from kYc0o/add_flashpage_write_raw
periph/flashpage: add flashpage_write_raw interface
2017-12-04 13:13:52 +01:00
kYc0o
cb0d021811 cpu/sam0_common/Makefile.features: add periph_flash_raw 2017-11-30 17:25:35 +01:00
kYc0o
adc08d6578 cpu/sam0_common: add alignment and minimum size write block constants 2017-11-30 17:25:35 +01:00
fcb3fd9e70 cpu/sam0_common: add flashpage_write_raw() 2017-11-30 15:14:39 +01:00
Martine Lenders
39c122155c
Merge pull request #7995 from smlng/make/fix/unused_params
make: fix unused-params error
2017-11-28 14:46:23 +01:00
smlng
7309171303 build: fix unused parameter errors
cpu, sam0_common: fix unused parameter in periph/spi
        cpu, kinetis_common: fix unused parameter in periph/spi
        cpu, cc2538: fix unused param in periph/i2c
        cpu, cc2538: fix unused param in periph/spi
        cpu, sam3: fix unused param in periph/spi
        cpu, stm32_common: fix unused param in periph/pm
        cpu, stm32f3: fix unused params in periph/i2c
        cpu, nrf5x_common: fix unused param in periph/gpio
        cpu, nrf5x_common: fix unused param in periph/spi
        cpu, lpc2387: fix unused params in periph/spi
        cpu, cc2538: fix unused params in radio/netdev
        cpu, cc2650: fix unused params in periph/uart
        cpu, lm4f120: fix unused param in periph/spi
        cpu, lm4f120: fix unused params in periph/timer
        cpu, lm4f120: fix unused params in periph/uart
        cpu, stm32_common: fix unused params in periph/dac
        cpu, stm32l0: fix unused params in periph/i2c
        cpu, msp430fxyz: fix unused params in periph/uart
        cpu, mips: fix unused params
        cpu, cc430: fix unused-params in periph/timer
        cpu, msp430fxyz: fix unused params in periph/spi
        drivers, cc2420: fix unused param
        cpu, mips32r2_common: fix unused params in periph/timer
        cpu, cc2538: fix unused-param in periph/i2c
        cpu, mips32r2_common: fix unused-param in periph/timer
        cpu, msp430fxyz: fix unused params in periph/timer
        cpu, atmega_common: fix unused params in periph/spi
        driver, nrfmin: fix unused params
        cpu, cc2538_rf: fix unused params
        driver, netdev_ieee802514: fix unused param
        cpu, mip_pic32m: fix unused params
        cpu, lpc2387: fix unused params in periph/pwm
        tests/driver_sdcard_spi: fix unused params
        cpu, sam3: fix unused param in periph/pwm
        tests/driver_dynamixel: fix unused params, and style issues
        cpu, cc430: fix unused param in periph/rtc
        cpu, atmega_common: fix unused params in periph/i2c
2017-11-28 14:36:01 +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
Hauke Petersen
89db77710f
Merge pull request #7963 from dylad/opt_sam0_gpio
cpu/sam0: share GPIO configuration
2017-11-13 14:58:56 +01:00
f6d7e54228
Merge pull request #7739 from kYc0o/factorise_sam0_ldscripts
ld: refactor sam0 ldscripts
2017-11-13 11:36:25 +01:00
dylad
2f4254b0df cpu/sam0: ensure PD is selected
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-11-10 10:43:40 +01:00
dylad
a06ace7904 cpu/sam0: share GPIO configuration
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-11-10 10:43:08 +01:00
Hauke Petersen
ec27204408 cpu/sam0: fixed cppcheck issue in i2c driver 2017-11-09 13:53:15 +01:00
Hauke Petersen
b3962f8d2c cpu/sam0: removed guards form periph drivers 2017-11-09 12:57:02 +01:00
kYc0o
ec9897f9a3 cpu/sam0_commmon/ldscripts: remove all samd/l family linker scripts 2017-11-07 15:06:40 +01:00
kYc0o
4c86d95014 cpu/sam0_common/Makefile.include: add CPU ROM and RAM lengths 2017-11-07 15:06:39 +01:00
Sebastian Meiling
2c19595b7e
Merge pull request #7763 from photonthunder/sam0_common_uart_receive
cpu/sam0_common/periph/uart - don’t setup receive if no pin is selected
2017-11-06 17:33:42 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
93246dbedd cpu: sam0: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
Dan Evans
d6ef4d2d51 cpu/sam0_common/periph/uart - don’t setup receive if no pin is selected 2017-10-23 16:22:58 -07:00
416ac62fbf pm: unify and set safe default pm_blocker 2017-10-16 14:32:27 +02:00
eef753a933 cpu/sam0: adapt support for samd21j18a with bootloader 2017-10-13 14:22:51 +02:00
Martine Lenders
6e8fc5cbe1 Merge pull request #7644 from smlng/cpu/sam0/flashpage
cpu, sam0_common: fix flashpage use bitfield
2017-10-13 12:05:44 +02:00
Joakim Nohlgård
7c1c6ac282 Merge pull request #7646 from aabadie/samd21_bootloader
cpu/sam0-common: rename mkr ldscript to more a generic name
2017-10-10 19:39:48 +02:00
smlng
ea1aa38b86 cpu, sam0_common: periph/uart use read-only bit-fields 2017-10-10 18:47:35 +02:00
smlng
732e60bb88 cpu, sam0_common: fix uart TXC check 2017-10-10 18:24:03 +02:00
Francisco Acosta
6da78131e7 Merge pull request #7675 from kaspar030/fix_sam0_uart
cpu/sam0/periph/uart: ensure uart_init() idempotency
2017-10-09 13:59:20 +02:00
ef1a8c66ac cpu/sam0/periph/uart: ensure uart_init() idempotency 2017-10-09 13:45:46 +02:00
Hauke Petersen
b75672628a Merge pull request #7632 from smlng/cpu/sam0_common/vendor_header
cpu, sam0_common: update vendor headers
2017-10-09 10:45:36 +02:00
487065da11 cpu/sam0_common/ldscripts: rename samd21g18a_mkr to samd21g18a_bootloader 2017-10-07 23:07:16 +02:00
Hauke Petersen
5711b5d53d cpu/sam0/gpio: do not clear pin on init 2017-10-04 12:12:43 +02:00
dylad
1e5262506d cpu/sam0: merge GPIO driver 2017-10-01 14:48:12 +02:00
Dan Evans
531e6f5008 sam0:usart - wake from sleep on receive line 2017-09-25 12:47:31 -06:00
smlng
48a996bbaa cpu, sam0_common: fix flashpage use bitfield 2017-09-25 09:24:43 +02:00
smlng
c5cbc428b4 cpu, sam0_common: update vendor headers 2017-09-20 17:11:54 +02:00
dylad
cca9b7a2c4 cpu/sam0: fix sercom gclk selection 2017-09-15 11:32:32 +02:00
Hauke Petersen
68abdff15a cpu/sam0: optimizations to the shared UART driver 2017-09-04 13:11:05 +02:00
Hauke Petersen
48ef1cd6c9 cpu/sam0_common: added SERCOM clk control functions 2017-09-04 13:08:17 +02:00
Hauke Petersen
4707ad2f89 cpu/sam0_common: fixed UART for samd21 2017-08-31 09:47:09 +02:00
dylad
a3acd1d741 remove dev variable for cppcheck
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-08-29 21:36:21 +02:00
dylad
c81ae98068 boards: update periph_conf of sam0 based board
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-08-29 21:26:42 +02:00
dylad
89c885ea40 sam0/uart: merge samd21 & saml21 uart driver
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-08-29 21:26:42 +02:00
b8070a6f5b cpu/sam0: unify for arduino-mkr1000 and arduino-mkrzero boards 2017-08-25 15:18:44 +02:00
24a1aacca2 cpu/sam0: add missing doxygen group definition + cleanup 2017-08-24 14:54:47 +02:00
smlng
01af6d94c4 cpu, periph: retain constness in spi_transfer_bytes 2017-06-29 15:47:13 +02:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Antonio Galea
dae3472d49 cpu/sam0_common: add saml21 i2c driver adaption 2017-06-23 11:19:56 +02:00
biboc
0e41861db0 Change my email address:
<baptiste.clenet@xsoen.com>
to
<bapclenet@gmail.com>
2017-06-19 10:38:16 +02:00
Dan Evans
4cc0e585d1 sam0/adc: assert resolution check fix 2017-06-08 11:04:11 -06:00
Hauke Petersen
4e29dce36b cpu/samd0: added flashpage driver implemenation 2017-06-02 11:32:34 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
d768f5b357 cpu/sam0_common: add support for MCU used in Arduino MKR1000 board 2017-05-16 10:14:59 +02:00
8501a03cbc cleanup: apply enable_debug_false.cocci to codebase (coccinelle)
Skipped sys/cbor/cbor.c, examples/microcoap_server/microcoap_sock.c,
as they use different semantics.
2017-05-15 18:45:43 +02:00
Hauke Petersen
5d5d4dc5a6 Merge pull request #6652 from hamilton-mote/spi-wtf
periph/spi: power regression
2017-05-15 09:17:28 +02:00
6b0cf6a728 Merge pull request #7027 from dylad/saml21_adc
saml21/adc: initial support
2017-05-12 23:33:47 +02:00
dylad
44dd56c3e8 sam0/adc: merged samd21 & saml21 adc driver
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-05-12 21:02:17 +02:00
Michael Andersen
20ee531486 periph/spi: hotfix for power regression 2017-05-12 10:24:47 -07:00
Hauke Petersen
21d97c6aa7 cpu/sam0: move sam0.h to vendor header tree 2017-05-11 12:33:22 +02:00
Joakim Nohlgård
9adeaf0942 cpu/sam0: cpuid: Refactor for clarity 2017-04-05 09:03:49 +02:00
Martine Lenders
577048db3a Merge pull request #6687 from dylad/fix_saml21_spi
SAML: Fix SPI SERCOM ID calculation
2017-04-03 20:24:30 +02:00
Hauke Petersen
5c7ed2228d pm_layerd: fix initial value for PM_BLOCKER_INITIAL
the current value was a debugging left-over and should
actually be 0.
2017-03-28 19:32:32 +02:00
dylad
c24c9390e5 cpu/sam0_common/include: fix SERCOM ID calculation for SAML family
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-03-22 21:08:41 +01:00
Hauke Petersen
37d4f44379 cpus: mv vendor headers to include/vendor/. 2017-03-07 08:55:15 +01:00
Hauke Petersen
ea07a6817c cpu/sam0+boards: adapted to new SPI API
- adapted the SPI driver
- merged SPI driver for samr21 and saml21
- adapted all boards using the CPU
2017-01-25 16:46:45 +01:00
245f60edfa cpu: fix typo in author email 2017-01-19 21:45:23 +01:00
Kees Bakker
2cbd3c4819 cpu/sam21:i2c: function _start was declared inline, but definition not 2017-01-18 21:30:13 +01:00
Kees Bakker
d509221e77 cpu/samd21:i2c: increase timeout in _start to facilitate SHT2x hold 2017-01-18 21:30:13 +01:00
Kees Bakker
bf4741d0d7 cpu/sam21_common:i2c: refactor a function to wait for response 2017-01-18 21:30:13 +01:00