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

36 Commits

Author SHA1 Message Date
crasbe
f93aa40186 cpu/stm32: add ADC support for WB55 2024-07-08 11:18:57 +02:00
Marian Buschsieweke
14795d4de0
cpu/stm32/periph/eth: update to new API 2024-05-08 21:06:00 +02:00
Dylan Laduranty
df044f4f56 cpu/stm32/periph/usbdev_fs: avoid using ztimer when not needed
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-03-13 21:39:07 +01:00
Gunar Schorcht
337a63ecb5 cpu/stm32/periph: add SDMMC support for F2/F4/F7/L4 2023-12-21 18:37:43 +01:00
Gunar Schorcht
94fdead641 cpu/stm32: add FMC support for LCD with parallel interface 2023-10-12 18:19:03 +02:00
Gunar Schorcht
37472d54c3 cpu/stm32/periph: add FMC support 2023-07-26 09:02:10 +02: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
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
7f4613da34 cpu/stm32/periph/usbdev_fs: changes to support STM32F3 2022-10-05 09:15:29 +02:00
Gunar Schorcht
78fc60c700 cpu/stm32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +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
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
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
Fabian Hüßler
33c2944076 cpu/stm32: add VBAT for stm32 2022-02-21 10:49:43 +01:00
06d3fba129
cpu/stm32/Makefile.dep: fix typo 2021-12-19 10:47:15 +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
Francisco Molina
63c51d4add cpu/stm32/wl: initial periph_adc implementation 2021-11-15 09:52:45 +01:00
766ebf0af5
stm32/usbdev: Use ztimer instead of xtimer 2021-10-27 18:56:42 +02:00
Francisco Molina
8e17b67a2f cpu/stm32: add rtc_mem 2021-09-07 10:06:31 +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
Marian Buschsieweke
ea3752db77
cpu/stm32: Added PTP clock implementation 2020-12-02 17:53:00 +01:00
Benjamin Valentin
a28a60f16c cpu/stm32: periph_eth: register with netdev 2020-11-29 23:10:37 +01:00
Marian Buschsieweke
5f9b55a182
cpu/stm32: Add stm32_eth_auto for auto-negotiation
Expose the auto-negotiation feature of the Ethernet device via the
pseudo-module stm32_eth_auto. With this enabled, the static speed configuration
set in the boards periph_conf.h will only be used if the PHY lacks
auto-negotiation capabilities - which is unlikely to ever happen.
2020-10-22 12:37:23 +02:00
Francisco
b5c51d244e
Merge pull request #14909 from OTAkeys/pr/conn_can_clean_up
can: add proper checks for ifnum validity
2020-10-01 09:22:28 +02:00
Vincent Dupont
590f07b38a stm32/can: fix features dependency 2020-09-30 12:59:03 +02:00
1259a89acf
cpu/stm32: remove useless bootloader dependency resolution 2020-09-28 21:07:01 +02:00
29b2a7aec1
cpu/stm32: integrate use of vectors generator in build system
The cmsis package is not added as a dependency but used directly before generating the vectors.c file
2020-09-02 11:30:49 +02:00
Jannes
f3e934988c drivers/stm32_eth: add 'NETDEV_EVENT_LINK_UP' event 2020-08-31 20:50:47 +02:00
Marian Buschsieweke
8d8af31e39
driver/stm32_eth: Integrate into periph_eth
The stm32_eth driver was build on top of the internal API periph_eth, which
was unused anywhere. (Additionally, with two obscure exceptions, no functions
where declared in headers, making them pretty hard to use anyway.)

The separation of the driver into two layers incurs overhead, but does not
result in cleaner structure or reuse of code. Thus, this artificial separation
was dropped.
2020-08-17 20:29:33 +02:00
f21440b176
cpu/stm32: use CMSIS headers from the stm32cmsis package 2020-07-16 17:35:48 +02:00
Francisco Molina
3107993434
cpu/stm32: add non blocking uart
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-06-11 09:51:41 +02:00
Benjamin Valentin
0819f0eb39 cpu/stm32: implement reset to bootloader
The STM32 line of microcontrollers comes with a bootloader in the ROM.
It provides the option to flash the device firmware in DFU mode (USB)
or via UART or SPI.

To enter the bootloader we have to jump to a specific address in memory,
but before reset the CPU to make sure the system is in a known state.

This enables us to use the usb_board_reset module on all STM32 platforms.
2020-06-05 18:41:06 +02:00
63a79ae6e4
cpu/stm32: move stmclk in its own module, remove useless ifdefs 2020-05-22 21:21:08 +02:00
5c810d8535
cpu/stm32: introduce unique directory for stm32 cpus 2020-05-20 13:39:10 +02:00