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

700 Commits

Author SHA1 Message Date
benpicco
b33688dec4
Merge pull request #18919 from gschorcht/cpu/stm32/fix_ram_len_stm32f4{2,3}{7,9}
cpu/stm32: fix RAM_LEN for F427, F429, F437, F439 models
2022-11-16 11:32:13 +01:00
Gunar Schorcht
7b99a5152f cpu/stm32: fix RAM_LEN for F427, F429, F437, F439 models
These models have 256 kByte RAM, but the upper 64 kByte are used as CCM data RAM accessible at 0x1000:0000. The access to 0x2003:xxxx leads to a hard fault.
2022-11-15 22:29:34 +01:00
Marian Buschsieweke
35149bd1c2
Merge pull request #18797 from MrKevinWeiss/pr/fixstmclk
cpu/stm32: Fix stm clock configuration
2022-11-15 11:39:25 +01:00
benpicco
384e3ca534
Merge pull request #18847 from krzysztof-cabaj/nucleo-f207zg-ADC
boards/nucleo-f207zg:  support for ADC
2022-11-05 01:55:30 +01:00
krzysztof-cabaj
aa426bd3aa cpu/stm32/f2: add ADC support for f207zg 2022-11-04 18:02:28 -04:00
Gunar Schorcht
31efa61eda cpu/stm32: improvement of USB driver selection
There are STM32 families where all models use only the Synopsys DWC2 USB OTG core while others completely use only the USB Device FS core. For these families then either the driver `drivers/usbdev_synopsys_dwc2` or the driver `cpu/stm32/periph/usbdev` is used depending on the respective family. However, the STM32 families F1 and L4 use both cores. The correct driver must therefore be selected depending on the CPU line or CPU model.
2022-11-03 13:52:01 +01:00
MrKevinWeiss
28aed3cb97
cpu/stm32/kconfig: rework clock tree
This splits up the clock configs.
It allows CPU_FAM based file sourcing and also common CPU_FAMs.
The dependancies are also included in wildcards would be used for the CPU_FAM macro.
This should be much more readable.
This also takes into account the HSE speeds in order to match the make/header resolution.
Some hidden symbols were added to make sorting many CPU_SERIES dependencies easier.
2022-11-03 11:37:33 +01:00
MrKevinWeiss
ba4843b5f4
cpu/stm32/Kconfig: Fix help indent 2022-11-03 11:37:32 +01:00
MrKevinWeiss
641d539092
cpu/stm: Fix clock settings F303* 2022-11-03 11:37:31 +01:00
MrKevinWeiss
17cce015d4
treewide/stm32: Make CLOCK_HS* configurable 2022-11-03 11:37:28 +01:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
benpicco
578d328ff4
Merge pull request #18711 from Enoch247/cpu-stm32-dma-fixes
cpu/stm32: fix periph_dma
2022-10-27 14:36:10 +02:00
Marian Buschsieweke
5ddc332b52
cpu/stm32/periph_pwm: support pin remap for F1
Add support to route timer peripheral to alternative pins for the
STM32F1.
2022-10-27 14:28:06 +02:00
Marian Buschsieweke
b6845cef79
cpu/stm32/periph_qdec: support pin remap for F1
Add support to route peripheral to alternative pins for the STM32F1
family.
2022-10-27 14:28:06 +02:00
Joshua DeWeese
4e2c63ce8c cpu/stm32/periph/dma: make dma_prepare() generic
This patch makes dma_prepare() handle register names a bit more
generically.
2022-10-26 09:36:45 -04:00
Joshua DeWeese
c888c103c2 cpu/stm32/periph/dma: fix dma_resume
As implmented, dma_resume assumed that transfers widths were 1 byte and
that the memory address incrmenting was always on and periphial address
incrementing always off. This resulted in memory corruption anytime
these assumptions were not true and a dma was resumed. The DMA module
allows intitiating transfers that did not meet these assumption.

This patch adds proper handling inside dma_resume to safely resume any
transfer. Clearifications and errors are added/fixed in the module's
header file. Also, a few constants are removed from the gobal namespace.
2022-10-26 09:36:45 -04:00
Joshua DeWeese
264a7c8ef9 cpu/stm32/periph/dma: fix DMA2 on STMF3 families
As it was, the calculation of DMA2's IRQ number was inccrorect for some
STM families. The implmentation alocates streams numbers 0 to 7 for the
first DMA controller and 8 and up for the second DMA controller. This
offset of +8 was not accounted for when IRQ's of the second DMA
controller was calculated. This patch corrects this.
2022-10-26 09:36:44 -04:00
Gunar Schorcht
9c8ec851ce cpu/stm32: define CFG_TUSB_RHPORT{0,1}_MODE dependent on used USB ports 2022-10-21 11:43:55 +02:00
Gunar Schorcht
1dfe79fe7c drivers/usbdev_synopsys_dwc2: use DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE
Use `DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE` instead of `USB_OTG_FS_TOTAL_FIFO_SIZE` since the latter is only defined in the vendor headers for STM32 MCUs. The STM32-specific problem that `USB_OTG_FS_TOTAL_FIFO_SIZE` is not defined in the vendor headers for all STM32 families has therefore been moved from the driver to the STM32-specific USB device header.
2022-10-17 20:03:57 +02:00
Marian Buschsieweke
40dd3bd68e
cpu/stm32: fix periph_usb modeling for STM32F1
- Fix source selection for STM32F105xx and STM32F107xx
- Fix KConfig modeling for STM32F105xx and STM32F107xx
2022-10-14 16:20:04 +02:00
Marian Buschsieweke
ea53b35d75
cpu/stm32: fix KConfig modeling for STM32F1 / usbdev_synopsys_dwc2
This fixes incorrect module selection for STM32F1 boards with feature
periph_usbdev, a regression introduced by
https://github.com/RIOT-OS/RIOT/pull/17812
2022-10-14 10:05:12 +02:00
Benjamin Valentin
aa6e8cafcf cpu/stm32: enable usbdev_fs for STM32F1 2022-10-13 12:00:22 +02:00
Gunar Schorcht
a76297c55e cpu/stm32/periph/usbdev_fs: small cleanup of comment formatting 2022-10-12 15:15:10 +02:00
Gunar Schorcht
dde72ad41b cpu/stm32/periph/usbdev_fs: implement PMA access schemes
There are two schemes for accessing the packet buffer area (PMA) from the CPU:
 - 2 x 16 bit/word access scheme where two 16-bit half-words per word can be accessed. With this scheme the access can be half-word aligned and the  PMA address offset corresponds therefore to the local USB IP address.  The size of the PMA SRAM is usually 1024 byte.
- 1 x 16 bit/word access scheme where one 16-bit half word per word can be  accessed. With this scheme the access can only be word-aligned and the  PMA address offset to a half-word is therefore twice the local USB IP  address. The size of the PMA SRAM is usually 512 byte.
Which access scheme is used depends on the STM32 model.
2022-10-12 15:15:10 +02:00
Gunar Schorcht
0177018277 cpu/stm32/periph/usbdev_fs: always use 16-bit addresses for PMA
The addressing of the Packet buffer Memory Area (PMA) is done locally in the USB IP core in half-words with 16-bit. The `_ep_in_buf` and `_ep_out_buf` arrays which hold these USB IP local addresses in the PMA for initialized EPs therefore always use `uint16_t`.
2022-10-12 14:19:30 +02:00
Gunar Schorcht
add766f3e1 cpu/stm32/periph/usbdef_fs: emulate disconnect/connect
If the MCU does not have an internal D+ pullup and there is no dedicated GPIO to simulate a USB disconnect, the D+ GPIO is temporarily configured as an output and pushed down to simulate a disconnect/connect cycle to allow the host to recognize the device. However, this requires an external pullup on D+ signal to work
2022-10-12 14:19:23 +02:00
Gunar Schorcht
58ebf02e58 cpu/stm32/periph/usbdev_fs: configure USB clock predivider
If `RCC_CFGR_USBPRE` is defined, the USB device FS clock of 48 MHz is derived from the PLL clock. In this case the PLL clock must be configured and must be either 48 MHz or 72 MHz. If the PLL clock is 72 MHz it is pre-divided by 1.5, the PLL clock of 48 MHz is used directly.
2022-10-12 14:18:55 +02:00
MrKevinWeiss
82dca7841f
cpu/stm32: fix stm32f3 kconfig model
MODULE_USBDEV_SYNOPSYS_DWC2 was being selected when it shouldn't
2022-10-10 12:37:10 +02:00
MrKevinWeiss
842ba5f51c
cpu/stm32: fix kconfig model usb clock 2022-10-10 12:10:29 +02:00
Gunar Schorcht
08bd418baa cpu/stm32/periph/usbdev_fs: coding style fix 2022-10-05 09:15:29 +02:00
Gunar Schorcht
7f4613da34 cpu/stm32/periph/usbdev_fs: changes to support STM32F3 2022-10-05 09:15:29 +02:00
Gunar Schorcht
1fde5a4401 cpu/stm32/periph/usbdev_fs: support GPIO for USB connect/disconnect
Since some STM32 MCU don't have internal D+ pullup, there are boards that use a GPIO for USB bus connect/disconnect.
2022-10-05 09:15:29 +02:00
Gunar Schorcht
3d1a3bf560 cpu/stm32/periph/usbdev_fs: allow USB signals as additional function
For a number of STM32 MCUs with the USB-FS device interface the signals USB_DP and USB_DM are not defined as GPIO alternative function but as additional function. Additional functions are directly selected/enabled through peripheral registers hand have not to be configured. In this case, the configuration defines GIO_AF_UNDEF as alternative function.
2022-10-04 13:59:43 +02:00
Gunar Schorcht
20bdd3452e cpu/stm32/periph/usbdev_fs: conditional configuration of CRS
Conditional configuration of CRS_CR_AUTOTRIMEN allows the compilation of the driver for STM32 MCUs that don't have Clock Recovery System.
2022-10-04 13:59:43 +02:00
Gunar Schorcht
66d0f948ba cpu/stm32/periph/usbdev_fs: fix register name
RCC_APB1SMENR1 is used if RCC_APB1SMENR_USBSMEN is defined. Without this fix, the conditional doesn't have any effect.
2022-10-04 13:59:43 +02:00
benpicco
429ee839cc
Merge pull request #18676 from krzysztof-cabaj/nucleo-l4r5zi-ADC
boards/nucleo-l4r5zi:  support for ADC
2022-10-04 13:26:16 +02:00
Gunar Schorcht
75071319de cpu/stm32: define HSE_VALUE for tinyUSB Synopsys DWC2 driver 2022-10-04 11:10:43 +02:00
Gunar Schorcht
9cf0119233 pkg/tinyusb: add tinyusb_hw_defaults.h for platform specific defaults 2022-10-04 07:40:18 +02:00
krzysztof-cabaj
3a23f2632e boards/nucleo-l4r5zi: add ADC support 2022-10-03 17:13:20 -04:00
Gunar Schorcht
76848492b0 cpu/stm32: add tinyUSB package support 2022-09-30 19:05:51 +02:00
benpicco
45afb8f986
Merge pull request #18644 from gschorcht/drivers/synopsys_dwc2
drivers: add driver for Synopsys DWC2 that is used as USB OTG peripheral on STM32 and ESP32x SoCs
2022-09-29 04:44:32 +02:00
Gunar Schorcht
78fc60c700 cpu/stm32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +02:00
Gunar Schorcht
7db66e49b3 drivers: add USB OTG FS/HS driver for Synopsys DWC2 IP core 2022-09-27 01:00:57 +02:00
chrysn
feff412bcc pkg: Move versions to dedicated line
Makefiles don't do comments, so these were forwarded into the variable.
*Most* users would expand the arguments to a shell where it'd be
ignored, but not all of them.

Contributes-To: https://github.com/RIOT-OS/RIOT/pull/18489

(This is also where the one version that is added here was removed).
2022-09-26 17:45:54 +02:00
Marian Buschsieweke
e402f1d885
Merge pull request #18418 from maribu/cpu/stm32/periph/stm32_eth_tracing
cpu/stm32/periph_eth: Add stm32_eth_tracing
2022-09-18 22:19:34 +02:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Benjamin Valentin
7abaae7bbd treewide: fix typos 2022-09-15 12:12:23 +02:00
Marian Buschsieweke
44b62e879d
cpu/stm32/periph_eth: add stm32_eth_tracing
Add tracing support via GPIOs to trace the basic state of the Ethernet
peripheral. The following signals are provided:

- One GPIO pin is toggled on entry of the Ethernet ISR
- On TX start an GPIO is set, on TX completion it is cleared
- On RX complete an GPIO is set, once this is passed to the upper layer
  the GPIO is cleared again

In order to reduce the overhead, GPIO LL is used. By default the
on-board LEDs are used as tracing GPIOs. This makes it easy to debug
when the state machine gets stuck without the need to attach a scope or
logic analyzer.
2022-09-14 14:00:27 +02:00
Marian Buschsieweke
efc307455e
cpu/stm32/periph_eth: increase debug output 2022-09-14 13:58:40 +02:00
Benjamin Valentin
74dc558972 cpu/{sam0_common, stm32}: select netdev_legacy_api in KConfig 2022-08-17 23:37:05 +02:00
Leandro Lanzieri
2dd59236c8
Merge pull request #18423 from MrKevinWeiss/pr/disable/hashchecks
.murdock: disable hash checks of kconfig/make
2022-08-17 18:30:36 +02:00
MrKevinWeiss
f79f43903d
cpu/periph_eth: Fix kconfig model
This probably can be done better as the periph_eth should not be
only part of the stm32 as the sam0 also uses it.
2022-08-17 14:37:22 +02:00
Marian Buschsieweke
276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
Marian Buschsieweke
bf67a9cdc5
cpu/stm32/periph_eth: optimize IRQ handler
We can just clear both TX and RX IRQ flags in any case, as clearing a
non-set flag is just a nop.
2022-08-09 07:33:34 +02:00
Marian Buschsieweke
82fbe08728
cpu/stm32/periph_eth: fix typo in initialization code
A single character type resulted in way fewer TX descriptors being
available than allocated. Not only resulted this in wasting memory,
but also when more iolist chunks than descriptors are send, the

```C
    assert(iolist_count(iolist) <= ETH_TX_DESCRIPTOR_COUNT);
```

does not trigger. As a result, old TX descriptors are being overwritten
in this case.
2022-08-08 15:13:27 +02:00
Leandro Lanzieri
1716638792
cpu/stm32/periph_eth: model in Kconfig 2022-07-25 11:08:32 +02:00
Dmitriy Okladov
9304e2bf37 cpu/stm32: support for B subfamily of g0 to determine ram length 2022-07-05 19:10:16 +03:00
Marian Buschsieweke
c9798c86ce
cpu/stm32/periph_eth: enable stm32_eth_link_up with lwip_ipv6
An network devices that supports netdev_driver_t::get(NETOPT_LINK, ...)
also has to emit NETDEV_EVENT_LINK_UP and NETDEV_EVENT_LINK_DOWN with
lwip for IPv6 duplicate address detection to work. The background is
that the STM32 Ethernet MAC requires a periodic timer to poll for the
state to emit these events. For this reason, `stm32_eth_link_up` was
introduced to allow applications to select if they need these events.

With this dependency in place, IPv6 addresses won't get stuck in a
tentative state any more.
2022-06-16 15:45:24 +02:00
benpicco
9b8f032c04
Merge pull request #17981 from maribu/gpio_ll/stm32
cpu/stm32: Implement periph/gpio_ll{,_irq} except for STM32F1
2022-05-24 11:34:53 +02:00
Marian Buschsieweke
bae91c1660
Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped
drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag
2022-05-03 12:06:37 +02:00
Benjamin Valentin
d6b5bf33b2 cpu/stm32: timer: implement TIM_FLAG_SET_STOPPED 2022-04-28 13:27:59 +02:00
Marian Buschsieweke
8bab36f1c5
cpu/stm32: Implement periph/gpio_ll{,_irq} except for STM32F1
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2022-04-22 14:34:57 +02:00
eb6afbba98
cpu/stm32: adapt ltdc periph disp_dev interface 2022-04-13 12:49:58 +02:00
Fabian Hüßler
e261db28c9 cpu/stm32/include/periph/f7: add missing ADC_DEVS 2022-04-12 22:39:17 +02:00
Benjamin Valentin
0340ac6129 cpu: include IDLE in PM_NUM_MODES 2022-04-06 12:29:25 +02:00
Leandro Lanzieri
37908431a1
cpu/stm32/eth: call netdev register from the setup function 2022-03-24 09:44:54 +01:00
cb5fef4486
cpu/stm32: use HSI with I2C 2022-03-23 10:10:08 +01:00
a7c1be8844
cpu/stm32: f439 line has hardware rng 2022-03-21 08:11:46 +01:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Ollrogge
41f961a197 periph/flashpage: Add _in_address_space feature 2022-03-17 19:45:54 +01:00
benpicco
6ddcfc07fb
Merge pull request #17727 from jeandudey/2022_03_01-stm32l1-line
cpu/stm32: Add STM32_LINE cases for STM32L1xxx6
2022-03-03 17:28:56 +01:00
Jean-Pierre De Jesus DIAZ
919d1b5094
cpu/stm32: Add STM32_LINE cases for STM32L1xxx6 2022-03-01 17:20:16 +01:00
Jean-Pierre De Jesus DIAZ
d64bbdffe5
cpu/stm32: Fix CLOCK_CORECLOCK on stm32l0/l1
With the previous order of the operation there was a loss of precision
when using certain values as the divider
2022-03-01 17:11:16 +01:00
Fabian Hüßler
e3509fc023 cpu/stm32: add sampling time to F4/F7 ADC driver 2022-02-21 10:49:43 +01:00
Fabian Hüßler
fa52f1e986 cpu/stm32: Consider VBAT on CPU init 2022-02-21 10:49:43 +01:00
Fabian Hüßler
33c2944076 cpu/stm32: add VBAT for stm32 2022-02-21 10:49:43 +01:00
Karl Fessel
726c461cb5
Merge pull request #17574 from kfessel/p-fix-asserth
core/assert: avoid including panic.h with assert.h
2022-02-15 11:57:55 +01:00
Karl Fessel
5e42af7935 cpu/stm32: i2c include panic.h 2022-02-12 18:30:58 +01:00
MrKevinWeiss
58097a20aa
cpu/stm32: clk tree account for 16 MHz 2022-02-10 13:27:50 +01:00
MrKevinWeiss
656be63fc0
cpu/stm32/wl: Model clock tree in kconfig 2022-02-07 13:58:43 +01:00
MrKevinWeiss
68e94ea2aa
cpu/stm32: Add clock config for mp1 to kconfig 2022-02-03 12:20:53 +01:00
MrKevinWeiss
7bebbc5545
cpu/stm32: Fix clock config in kconfig 2022-02-01 13:58:07 +01:00
Fabian Hüßler
70d3d647d1 cpu/{cortexm_common, stm32}: add support for backup RAM 2022-01-21 15:53:18 +01:00
Francisco Molina
579ca6d941 drivers/periph_spi: spi_init_with_gpio_mode mode by reference 2022-01-18 16:22:18 +01:00
4e582b360f
cpu/stm32: add disp_dev interface for LTDC 2022-01-07 14:32:24 +01:00
deccc720e3
cpu/stm32: add support for LTDC periph 2022-01-07 14:32:24 +01:00
796e127df9
boards/stm32: replace GPIO_UNDEF with SPI_CS_UNDEF 2022-01-06 12:34:09 +01:00
4d75c6ddde
cpu/stm32: group periph definitions by periph type 2022-01-02 20:07:51 +01:00
Benjamin Valentin
8607a9cdfa
cpu/stm32: extend RAM with SRAM4 2022-01-02 15:43:37 +01:00
2f0efa8c9e
cpu/stm32: add initial support for stm32u5 family 2021-12-23 11:04:41 +01:00
benpicco
b17fa61e83
Merge pull request #17422 from aabadie/pr/cpu/stm32_typo
cpu/stm32/Makefile.dep: fix typo
2021-12-20 15:23:18 +01:00
06d3fba129
cpu/stm32/Makefile.dep: fix typo 2021-12-19 10:47:15 +01:00
6f69996937
cpu/stm32/Kconfig: replace tabs with spaces 2021-12-19 10:37:29 +01:00
ec46f1b3f1
cpu/stm32: remove invalid symbols used in Kconfig 2021-12-19 10:33:12 +01:00
MrKevinWeiss
4ac5ad66db
cpu/stm32: Model bootloader_stm32 module 2021-12-15 08:38:59 +01:00
Leandro Lanzieri
df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +01:00
Francisco Molina
9438c20c59 cpu/stm32/periph: remove unused xtimer includ 2021-12-09 12:14:42 +01:00
Marian Buschsieweke
e071098d26
cpu/stm32/periph: use uintptr_t instead uintptr_t * 2021-12-03 14:21:54 +01:00
Marian Buschsieweke
509ced8abb
cpu/stm32/periph_can: use container_of()
This silences false positives of -Wcast-align
2021-12-03 10:12:35 +01:00
Marian Buschsieweke
7cd9d615fa
cpu/stm32/periph: Use uintptr_t for periph addr
The peripheral register addresses are fixed, properly aligned addresses. Storing
them as uintptr_t makes live easier when casting them to helper structs, as no
intermediate cast to uintptr_t is needed to silence -Wcast-align.
2021-12-03 10:12:32 +01:00
4d96c1f8e0
Merge pull request #17281 from dylad/pr/cpu/stm32/usbdev_fs_support
cpu/stm32: add new usbdev FS support
2021-12-02 21:57:49 +01:00
Marian Buschsieweke
ec39b8e3aa
Merge pull request #17320 from aabadie/pr/cpu/stm32_ztimer
cpu/stm32: migrate adc and eth periphs to ztimer
2021-12-02 20:05:43 +01:00
dylad
f5cd2d1438 cpu/stm32: enable HSI48 when needed for L4/Wx 2021-12-02 14:26:03 +01:00
dylad
083e53406d cpu/stm32: add support for a new USBDEV periph
Also rename the other usbdev driver to avoid conflicts
2021-12-02 14:26:03 +01:00
924c2fd6da
cpu/stm32/adc: migrate to ztimer 2021-12-02 13:44:03 +01:00
0c7d2a0f55
cpu/stm32/eth: migrate to ztimer 2021-12-02 12:22:41 +01:00
337b99002a
cpu/stm32/stmclk: enable 48MHz when usbdev is used 2021-12-01 10:15:19 +01:00
f07696e7a2
cpu/stm32/usbdev: poweron USB during initialization 2021-12-01 10:15:19 +01:00
6c60326612
cpu/stm32/kfconfigs: add new CPU from L4 family 2021-11-29 14:26:00 +01:00
a9106719c2
cpu/stm32/kfconfigs: add new CPUs from G4 family 2021-11-29 14:20:20 +01:00
658fa5d048
cpu/stm32/kfconfigs: add new CPUs from G0 family 2021-11-29 14:19:16 +01:00
16db45f77e
cpu/stm32: fix missing clock configuration defines for g0 2021-11-29 14:12:18 +01:00
d09f2e99e3
cpu/stm32/kfconfigs: add new CPUs from WB family 2021-11-29 13:57:20 +01:00
1746bf9e6f
cpu/stm32/dist: fix bug in gen_kconfig.py script 2021-11-29 13:52:26 +01:00
6a219d7cfa
cpu/stm32: bump cmsis versions to latest release 2021-11-29 13:22:59 +01:00
Gunar Schorcht
007e29ebb5 cpu/periph/i2c: update implementations to new I2C API
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
06530c4297
cpu/stm32: clone cmsis header in build/stm32 2021-11-19 13:24:57 +01:00
c81df904ea
stm32/usbdev: Adapt to xmit API 2021-11-16 20:17:04 +01:00
76215adef1
Merge pull request #17154 from maribu/cpu/stm32/periph_usb
cpu/stm32/periph/usbdev: fix alignment issues
2021-11-16 11:20:34 +01:00
Francisco
72abac66f1
Merge pull request #17183 from fjmolinas/pr_stm32wl_adc
cpu/stm32/wl: initial periph_adc implementation
2021-11-15 19:06:24 +01:00
benpicco
70ae34a448
Merge pull request #16979 from ospoco/master
cpu/stm32: Add hardening changes to stm32
2021-11-15 15:09:01 +01:00
Francisco Molina
63c51d4add cpu/stm32/wl: initial periph_adc implementation 2021-11-15 09:52:45 +01:00
VanL
ee832148b3 cpu/stm32: Add hardening changes to stm32
Initialize STM32 RDP in a glitch-resistant fashion to prevent
debugger use when restrictions are set by the designer.
2021-11-11 15:58:52 -06:00
Francisco Molina
ec0e3d242e cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro 2021-11-11 19:58:34 +01:00
Marian Buschsieweke
825a598ca7
cpu/stm32/periph/usbdev: fix alignment issues
Make sure in `_usbdev_new_ep()` that `usbdev_ep_t::buf` is always aligned to 4
bytes. With this in mind, add intermediate casts to `uintptr_t` before casting
`usbdev_ep_t::buf` to `uint32_t *` to silence `-Wcast-align`, as we now manually
enforced correct alignment.
2021-11-06 20:19:39 +01:00
Leandro Lanzieri
f64b166319
Merge pull request #16845 from MrKevinWeiss/pr/kconfig/supportstms
.murdock: Add nucleo boards to kconfig test
2021-11-01 09:55:22 +01:00
766ebf0af5
stm32/usbdev: Use ztimer instead of xtimer 2021-10-27 18:56:42 +02:00
MrKevinWeiss
9b6a63a951
drivers/kconfig: simplify shared rtt/rtc hardware in kconfig 2021-10-14 11:28:46 +02:00
MrKevinWeiss
c7820cf7e5
*/rtt|rtc: Fix Kconfig modeling 2021-10-14 11:28:44 +02:00
benpicco
ffd1254eac
Merge pull request #16959 from bissell-homecare-inc/stm32g031-disco
boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board
2021-10-13 23:17:06 +02:00
Dave VanKampen
55ea8cfb97 boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
kl
0f2d10dfb7 cpu/stm32: add HWRNG support to CPU_LINE STM32F469XX 2021-10-13 11:22:45 +02:00
luisan00
af4c01bbc6 cpu/stm32: add stm32f469i to ADCs defs 2021-10-11 23:35:48 +02:00
luisan00
6459d4c344 cpu/stm32: fix duplicated defs 2021-10-10 00:04:51 +02:00
Francisco
211c1a51d8
Merge pull request #16886 from bissell-homecare-inc/g030_ram_len
cpu/stm32: added RAM_LEN identifier for stm32g03x
2021-09-28 13:40:42 +02:00
benpicco
d1768e95a5
Merge pull request #16885 from bissell-homecare-inc/g0_adc
cpu/stm32: added ADC for g0
2021-09-25 18:32:19 +02:00
Dave VanKampen
6414c64f89 cpu/stm32: added ADC for g0 2021-09-24 10:20:09 -04:00
Dave VanKampen
664f5d156d cpu/stm32: added RAM_LEN identifier for stm32g03x 2021-09-23 10:06:33 -04:00
Dave VanKampen
7ab8ec391a cpu/stm32: added APB12 bus multiplier entry for applicable cpus 2021-09-23 08:46:52 -04:00
Jean Pierre Dudey
ffff68deaf
Merge pull request #16813 from jeandudey/doc1
cpu: fix doxygen grouping warnings
2021-09-13 11:30:27 +02:00
Francisco Molina
8e17b67a2f cpu/stm32: add rtc_mem 2021-09-07 10:06:31 +02:00
Jean-Pierre De Jesus DIAZ
9d1cff3b55 cpu/stm32: fix doxygen grouping warnings
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-05 20:39:15 +02:00
Hugues Larrive
f292cfc8ce drivers/periph_spi: remove duplicated includes introduced in #15902 2021-09-02 09:40:31 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Benjamin Valentin
f903ec90d4 drivers/flashpage: flashpage_page() takes a const argument
All addresses to flashpage_page() must be in flash. Flash memory is
`const`, therefore this function must also take `const` pointers.
2021-08-27 14:08:25 +02:00
benpicco
0b69747389
Merge pull request #16023 from maribu/max_pdu_size
sys/net/netopt: Drop deprecated NETOPT_MAX_PACKET_SIZE
2021-08-26 14:40:18 +02:00
Benjamin Valentin
39b81c332e cpu/stm32: remove ErrorStatus enum from vendor files 2021-08-25 18:42:40 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
benpicco
775d6095bc
Merge pull request #16660 from fjmolinas/pr_lora_e5_dev
boards/lora-e5-dev: initial support
2021-07-21 14:36:58 +02:00
Francisco Molina
c62f6e0590
cpu/stm32/flashpage: adapt to non dual-core stm32wl 2021-07-21 11:28:16 +02:00
Francisco Molina
8a8e023d04
cpu/stm32/wl: common subghz debug pin initialization 2021-07-21 11:28:15 +02:00
Francisco Molina
f2995240d4
cpu/stm32: handle parsing stm32wlex CPU_MODELs 2021-07-21 11:23:47 +02:00
benpicco
4f905bfa8c
Merge pull request #15493 from benpicco/riotboot-serial
riotboot: implement serial flasher
2021-07-21 11:01:31 +02:00
Benjamin Valentin
a93deb4e95 cpu/stm32: usbdev: fix pm_layered include 2021-07-20 22:51:59 +02:00
aidiaz
5b9d8bd6c8 Update rtc_all.c for CPU_FAM_STM32L5 support. 2021-07-19 10:49:38 -04:00
José Alamos
934c875aba
Merge pull request #16579 from akshaim/pr/wl55jc_lorawan_final
drivers/sx126x: Add support for Nucleo -WL55JC
2021-07-09 14:48:11 +02:00
Akshai M
f58a021f6d cpu/stm32wl : Add HW Debug pins 2021-07-09 11:16:41 +02:00
Akshai M
a4bbf0cffc cpu/stm32 : APB3 and VDDTCXO config
Add APB3 disable, Enable VDDTCXO for Radio
2021-07-09 11:16:41 +02:00
Akshai M
f68dab9ccb cpu/stm32: add GPIO_AF_UNDEF 2021-07-09 11:16:41 +02:00
Jose Alamos
97f20198a0
stm32/eth: avoid explicit cast to netdev 2021-07-09 10:38:35 +02:00
Akshai M
d3aa6ca00b stm32/periph/spi : Add check for GPIO_UNDEF 2021-07-08 13:38:07 +02:00
MrKevinWeiss
02a2de4916
cpu/stm32: Add Kconfig dependency modeling 2021-07-02 15:11:05 +02:00
Francisco
52f5746904
Merge pull request #16545 from aidiaz/periph_rtt_l5
cpu/stm32/periph/rtt_all: RTT peripheral support for CPU_FAM_STM32L5
2021-06-15 18:19:11 +02:00
aidiaz
fc1cd85c76 cpu/stm32/periph_rtt: RTT peripheral support for CPU_FAM_STM32L5 2021-06-15 09:49:55 -04:00
Rémy Grünblatt
deb8d34c43 cpu/stm32: Generate the irqs in a reproducible manner 2021-05-29 14:28:36 +02:00
Jean Pierre Dudey
5fd6daac3e
Merge pull request #16319 from jue89/fix/stm32-gpio_all-isr
cpu/stm32/gpio_all: fix IRQ handler for G0/L5/MP1 families
2021-05-23 21:40:02 +02:00
Francisco
967cbcd7e1
Merge pull request #16478 from jue89/fix/stm32-gpio_f1-isr
cpu/stm32/gpio_f1: fix IRQ handler
2021-05-19 08:55:04 +02:00
Hugues Larrive
1cf34afb76 cpu/stm32/periph/adc_f3.c: e-mail update 2021-05-15 05:53:45 +02:00
127d6853c7
cpu/stm32/gen_kconfig: use openpyxl package instead of xlrd 2021-05-01 11:31:56 +02:00
d39fd7c773
cpu/stm32/genkconfig: make copyright year configurable 2021-05-01 11:31:11 +02:00
benpicco
08f1f9768d
Merge pull request #16418 from fjmolinas/pr_stm32_spi_param_order
cpu/stm32/periph/spi: fix wrong parameter order
2021-04-30 14:37:17 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Francisco Molina
fc9fc5c057
cpu/stm32/periph/spi: fix wrong parameter order 2021-04-30 09:17:38 +02:00
Benjamin Valentin
49585fc517 cpu/stm32: flashpage: use common helper functions 2021-04-27 16:52:37 +02:00
Akshai M
1f7a10305a stm32/periph/flashpage: Reset cache
Co-authored-by: Francisco <femolina@uc.cl>
2021-04-20 21:04:36 +02:00
Akshai M
efb86039c6 cpu/stm32wl: Add RTT support 2021-04-20 21:04:36 +02:00
Akshai M
2cf081b509 cpu/stm32wl: Flashpage configuration 2021-04-20 21:04:36 +02:00
Akshai M
df1cae172c stm32/irqs: Adapt generators to support WL
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2021-04-20 21:04:36 +02:00
Akshai M
b816c67bdd nucleo-wl55jc: Add Kconfig files 2021-04-20 21:04:35 +02:00
Akshai M
fd8ddd6161 boards: add nucleo-wl55jc
Co-authored-by: Kevin "Tristate Tom" Weiss <weiss.kevin604@gmail.com>
2021-04-20 21:04:29 +02:00
Akshai M
c485c774cf cpu/stm32: add stm32wl 2021-04-20 20:57:48 +02:00
Jue
80360e5308 cpu/stm32/gpio_f1: fix IRQ handler 2021-04-12 18:45:04 +02:00
Jue
2f503f11fa cpu/stm32/gpio_all: fix IRQ handler for G0/L5/MP1 families 2021-04-12 17:01:33 +02:00
Francisco
700046238f
Merge pull request #16261 from maribu/cpu/stm32/periph_eth
cpu/stm32/periph_eth: fix format specifier in DEBUG()
2021-04-07 09:32:09 +02:00
Francisco
e04dd4dcce
Merge pull request #16272 from jue89/fix/stm32_gpio_irq
cpu/stm32/gpio: fix IRQ handler
2021-04-02 13:07:39 +02:00
Jue
43f83a520b cpu/stm32/gpio: fix IRQ handler 2021-04-01 19:31:27 +01:00
Marian Buschsieweke
164aa72250
cpu/stm32/periph_eth: fix format specifier in DEBUG()
Use PRIu32 instead of lu to make LLVM happy.
2021-03-31 10:11:46 +02:00
Karl Fessel
cf7078ab0a stm32/ptp: avoid creating a new rounding rule 2021-03-29 16:27:27 +02:00
Marian Buschsieweke
28e6544748
Merge pull request #16236 from maribu/cpu/stm32/periph_eth
cpu/stm32/periph_eth: bugfix
2021-03-28 09:20:15 +02:00
Marian Buschsieweke
7b08b97eb6
cpu/stm32/periph_eth: bugfix & cleanup
Fix compilation with module `stm32_eth_link_up` when `stm32_eth_auto`
is not used by relying on the compiler to optimize unused functions
and variables out, rather than using the preprocessor.
2021-03-26 17:42:45 +01:00
Marian Buschsieweke
650559276f
cpu/stm32/periph_ptp: bugfix & better debug output
- Clear the PTP timer interrupt *after* the user callback is executed
    - Otherwise it would be possible that the ISR sets another super
      short timeout that triggers during ISR, which also gets cleared
    - This is a pretty nasty race condition :-/
- The debug output was a bit too verbose to be generally useful. Some
  noise is now silenced unless `DEBUG_VERBOSE` is `#define`d to 1
2021-03-23 22:58:10 +01:00
Benjamin Valentin
dde3ca5f46 cpu/stm32: candev: derive number of CAN interfaces from vendor header
We can deduce the number of available CAN interfaces from the vendor headers
so no need to hard-code this number for individual part numbers.
2021-03-09 11:30:21 +01:00
benpicco
b09f799038
Merge pull request #16161 from madokapeng/nucleo722ze_CAN_support
boards/nucleo-f722ze: Add periph_can
2021-03-08 19:22:38 +01:00
madokapeng
905723be59 sys/include/can: Add loopback operation mode
tests/candev: Add loopback mode for testing purpose
2021-03-08 12:13:15 -05:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
madokapeng
a38cd1477e boards/nucleo-f722ze: Add periph_can support
cpu/stm32: Add CAN support for f722ze board

f722ze board has ONLY 1 CAN interface, fix compiling error which
treats f722xx has more than 1 CAN.
2021-03-05 23:22:44 -05:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
Marian Buschsieweke
720b350f6f
cpu/stm32: fix periph_rtt
For some reason rtt_get_alarm was never implemented. This adds the
missing function.
2021-03-03 17:02:59 +01:00
Francisco
c91499997e
Merge pull request #16030 from benpicco/drivers/mtd_flashpage-fix_native
drivers/mtd_flashpage: fixes for native (and stm32l0, stm32l4)
2021-02-23 15:12:06 +01:00