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

51 Commits

Author SHA1 Message Date
5f3a9de7fa
treewide: fix path to ztimer test applications 2023-05-13 19:08:38 +02:00
Benjamin Valentin
9dcb3991d2 cpu/sam0_common: move adc_res_t to common code 2023-01-17 17:18:07 +01:00
Jue
73e6886b2c cpu/saml21: define required power modes
We can get rid initially blocked pm modes \o/
2022-11-03 14:53:45 +01:00
Jue
d0c11e568a cpu/saml21/pm: specify power mode names 2022-10-31 22:18:00 +01:00
Benjamin Valentin
361a94460a cpu/sam0_common: add ADC pin aliases 2022-08-31 18:23:44 +02:00
Benjamin Valentin
9af5deb54a cpu/saml21: define ADC pins 2022-05-30 20:41:18 +02:00
Benjamin Valentin
0340ac6129 cpu: include IDLE in PM_NUM_MODES 2022-04-06 12:29:25 +02:00
Jean-Pierre De Jesus DIAZ
480e22be66 cpu/sam*: fix doxygen grouping warnings
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-11 12:45:15 +02:00
Antonio Galea
8bd90aaf00 cpu/saml21: fix timer skew for slow clocks 2021-05-05 10:56:37 +02:00
Benjamin Valentin
fecc5bdcff cpu/saml21: add NVM User Page Mapping 2020-11-10 12:18:47 +01:00
Juergen Fitschen
cc22324bd4 cpu/saml21: adjust RTT_MIN_OFFSET 2020-06-23 11:59:56 +02:00
Francisco Molina
f41b43e263
cpu/saml21: add unified rtt configuration 2020-06-19 09:16:23 +02:00
Antonio Galea
3076ee837d cpu/saml21: add clock configuration for usbdev
Co-authored-by: dylad <dylan.laduranty@mesotic.com>
2020-06-15 11:52:13 +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
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
dylad
f2afcd171b cpu/saml21: add DFLL48M support 2020-03-26 18:03:02 +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
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
Yegor Yefremov
5b0252b150 doxygen/ADC: don't include overridden typedefs
Add missing #ifndefs to overridden ADC resolution typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Benjamin Valentin
01b3484ffb cpu/saml21: add definitions for low power SRAM
SAML21 provides 2/4/8 kiB of Low Power SRAM that is retained
in backup mode.

This adds definitions to make that memory availiable to RIOT.
2019-10-01 18:39:40 +02:00
dylad
e189d085b0 cpu/sam0: add support for SAMR34 MCU 2019-09-26 10:48:03 +02:00
7cf3510b64
cpu/saml21: extends exti configuration for saml21 variants
Added a configuration for saml21g18a and fixes the configuration for samr30g18a
2019-01-30 09:32:59 +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
dylad
1e5262506d cpu/sam0: merge GPIO driver 2017-10-01 14:48:12 +02:00
24a1aacca2 cpu/sam0: add missing doxygen group definition + cleanup 2017-08-24 14:54: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
dylad
55de3781ca saml21/adc: initial support
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2017-05-09 22:14:54 +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
245f60edfa cpu: fix typo in author email 2017-01-19 21:45:23 +01:00
a8c5fcc5eb cpu: saml21: add periph/pm support 2017-01-12 16:26:02 +01:00
310e193494 Merge pull request #6224 from haukepetersen/rm_saml21_saml21periphh
cpu/saml21: removed unused saml21_periph.h
2016-12-16 21:07:27 +01:00
Hauke Petersen
74bba2a183 cpu/saml21: removed unused saml21_periph.h 2016-12-15 11:59:54 +01:00
Hauke Petersen
bfb52afde9 cpu/sam21: unified structure for sam[drl]21 CPUs 2016-12-15 11:39:19 +01:00
Joakim Nohlgård
7275f9845f cpu: Conditionally define LITTLE_ENDIAN
Caused problems with redefined macros when building with a recent newlib
2016-07-05 13:22:50 +02:00
Ian Martin
49ae438dd5 doc: eliminate clutter in adc and gpio periph docs 2016-06-29 15:08:32 -04:00
zhuoshuguo
1cbe79a373 CPU: fix include header guards
Fix cpu/lpc2387/include/lpc2387.h
2016-06-08 16:38:20 +02:00
Hauke Petersen
9bd848f113 cpu/saml21: adapted GPIO driver 2016-03-17 14:39:11 +01:00
6881f65f46 cpu: cortexm*: move cpu_conf.h stuff from cpu.h into cpu_conf_common.h 2016-03-05 18:20:17 +01:00
Hauke Petersen
48a639f8fd cpu/sam21_common: used shared periph_cpu.h 2016-02-08 19:04:28 +01:00
Hauke Petersen
940097336a cpu: cleanup and unification of CPUID implementations
- moved definition of CPUID_LEN to periph_cpu.h
- fixed some doxygen
- simplyfied some implementations
2016-02-08 14:36:03 +01:00
Hauke Petersen
d43dc9182f cpu: s/GPIO(x,y)/GPIO_PIN(x,y)/ 2015-10-13 14:59:54 +02:00
889991503e cpu: saml21: remove obsolete hwtimer support 2015-09-16 10:58:52 +02:00
21c774fd82 cpu: saml21: use periph_common SPI functions 2015-08-14 14:46:35 +02:00
Hauke Petersen
4ae5204b36 cpu: added dev_enums.h include to all periph_cpu.h 2015-06-16 22:41:16 +02:00
Hauke Petersen
ac8ad5419d cpu/saml21: added custom GPIO_UNDEF define 2015-06-14 16:16:04 +02:00
Hauke Petersen
aeecb09883 cpu/saml21: remodeld GPIO driver implementation 2015-06-12 19:10:48 +02:00
Hauke Petersen
3c48722e0f cpu/saml21: adapted to centralized cpu conf 2015-05-29 16:44:52 +02:00
Hauke Petersen
bca23c410b cpu/saml21: use core_panic in startup.c 2015-05-29 12:55:13 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
bd479a5564 cpu: saml21: adapt to new THREAD_ stacksize defines 2015-05-26 20:58:51 +02:00