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

176 Commits

Author SHA1 Message Date
Marian Buschsieweke
33195d7965
cpu/sam{d21,d5x,l21}: Claim support for BlackMagic Probe
Using `PROGRAMMER=bmp` has been proven to work reliably at least on
SAMD21, SAMD5x and SAML21.

Since using unsupported programmers is treated as a warning, this change
only reduces the noise in the shell a bit and is not a functional
change.

[1]: https://black-magic.org/supported-targets.html
2024-11-21 17:20:48 +01:00
Dylan Laduranty
bc188c5a48 cpu/saml21: avoid the use of bitfield
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-05-30 17:29:00 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
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
Benjamin Valentin
124b849503 cpu: call early_init() 2023-01-08 22:26:12 +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
75295df810 cpu/saml21/pm: allow blocking IDLE mode 2022-10-31 22:18:00 +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
Benjamin Valentin
c44cf1423e cpu/saml21: derive low power SRAM length from model number 2022-02-21 19:04:16 +01:00
benpicco
e8cbf1ea90
Merge pull request #16681 from benpicco/drivers/dose-collision
drivers/dose: make use of UART collision detection feature
2021-12-08 20:48:28 +01:00
Benjamin Valentin
a51fb298dc cpu/sam0_common: implement periph_uart_collision feature 2021-12-08 17:35:00 +01:00
Benjamin Valentin
669104d841 cpu/sam0_common: SPI: don't perform DMA transfer for small buffers
Setting up a DMA transfer can take longer than sending out a buffer
byte by byte if the buffer is small.

DMA only shows advantages for large buffers, using it for every transfer
will cause a net slowdown.

Since we did not come up with a good way to determine the treshold based
on the SPI frequency, just use a fixed buffer for now so that DMA can be
used without slowing things down overall.
2021-11-19 17:22:51 +01: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
Benjamin Valentin
3fbf473a07 cpu/sam0_common: implement periph_rtc_mem 2021-09-03 11:43:43 +02:00
Antonio Galea
c6f6f925a0 cpu/saml21: moved GCLK_GENCTRL_SRC_MAIN define to top 2021-05-05 23:59:05 +02:00
Antonio Galea
c03816f61f cpu/saml21: fix wrong timer for CORECLOCK at 48MHz 2021-05-05 16:34:01 +02:00
Antonio Galea
8bd90aaf00 cpu/saml21: fix timer skew for slow clocks 2021-05-05 10:56:37 +02:00
Antonio Galea
99de702c87 SAML21 CPU: support 4MHz, 8MHz, 12MHz CORE_CORECLOCK choices 2021-05-03 18:56:51 +02:00
Benjamin Valentin
9c1455d55f cpu: make pm_layered a DEFAULT_MODULE
Allow to disable pm_layered in the bootloader to save some ROM.
2021-01-27 13:21:20 +01:00
Benjamin Valentin
8004aa4d34 cpu/sam0_common: not every CPU has DMA 2021-01-12 15:48:37 +01:00
Benjamin Valentin
fecc5bdcff cpu/saml21: add NVM User Page Mapping 2020-11-10 12:18:47 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
benpicco
5715f5776b
Merge pull request #14804 from bergzand/pr/sam0/gpio_iobus
sam0_common: Use Single-cycle I/O Port for GPIO when available
2020-09-10 23:45:43 +02:00
6007a31813
sam0: Add periph_gpio_fast_read feature where applicable 2020-09-10 22:13:25 +02:00
Benjamin Valentin
cd5a847684 cpu/sam0_common: define CPU_FAM based on CPU_MODEL 2020-08-24 16:13:18 +02:00
Benjamin Valentin
5d96151775 cpu/saml21: define CPU_COMMON_SAML21 symbol and use it 2020-08-24 16:13:18 +02:00
Benjamin Valentin
bc904cb396 cpu/saml21: add all parts to Kconfig 2020-08-24 16:13:18 +02:00
Antonio Galea
6a59569f1f boards/yarm: definition for SAML21J18B CPU model 2020-08-21 15:18:41 +02:00
Leandro Lanzieri
64f75bcc30
cpu/saml21: Add Kconfig symbols 2020-07-16 21:29:46 +02: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
Dylan Laduranty
5e625adcf5
Merge pull request #12132 from ant9000/pr/saml21_usbdev_48mhz_clock
cpu/saml21: enable 48mhz clock for usbdev
2020-06-16 21:02:41 +02:00
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE 2020-06-16 12:05:40 +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
4ef0b85495
cpu/saml21: Add DMA peripheral to init 2020-06-12 20:04:05 +02:00
Leandro Lanzieri
106ab65d7b
cpu/saml21: Check CPU_MODEL to provide periph_hwrng 2020-05-29 16:19:00 +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
f037e06b13 cpu/saml21: enable buck voltage regulator when possible
Switch from the on-chip LDO to the on-chip buck voltage regulator
when not fast internal oscillators are used.

On `saml21-xpro` with `examples/default` this gives

**before:** 750 µA
** after:** 385 µA
2020-04-02 17:25:16 +02:00
Benjamin Valentin
3f95d3d2e3 cpu/saml21: pm: set deep flag
Set the deep flag for consistency with other family members.
2020-04-02 17:25:13 +02:00
Benjamin Valentin
7e156dd2e5 cpu/saml1x, saml2x: PM_NUM_MODES is a valid mode
The mode PM_NUM_MODES is the IDLE mode, so do not skip it.
2020-04-01 18:10:23 +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
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
Leandro Lanzieri
218f7bfe0c
cpu/saml21: Add Kconfig file 2020-03-31 13:39:41 +02:00
dylad
f2afcd171b cpu/saml21: add DFLL48M support 2020-03-26 18:03:02 +01:00