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

211 Commits

Author SHA1 Message Date
ec5b47fc61
cpu/stm32l4+/wb: centralize max core clock define, adapt related boards 2020-10-27 08:44:55 +01:00
05f67a0a00
cpu/stm32: remove useless include in clock configuration 2020-10-26 11:21:07 +01:00
d6d85a3370
cpu/stm32: add common clock configuration header 2020-10-26 11:21:07 +01:00
f2e2c89424
cpu/stm32: move clock configuration headers to cpu 2020-10-26 11:16:23 +01:00
7f26d5c389
cpu/stm32l5: adapt flashpage periph 2020-10-23 18:21:50 +02:00
a416b2793f
cpu/stm32: add basic support for stm32l5 2020-10-23 18:21:50 +02:00
02c4b05a5a
cpu/stm32: configure stm32l5 cmsis repository version 2020-10-23 18:13:07 +02:00
2e2b87dda5
cpu/stm32: define EEPROM size for stm32l011k4 2020-10-15 16:24:33 +02:00
Marian Buschsieweke
6294382627
cpu/stm32: Use mii.h for periph_eth
Use shared MII definitions and utilities instead own definitions.
2020-10-12 08:46:20 +02:00
Marian Buschsieweke
7920d32e32
cpu/stm32: Clean up periph_eth
Use `addr` instead of `mac` when referring to L2 address.
2020-10-05 16:03:47 +02:00
ec2e1a15f9
cpu/stm32: move cmsis package Makefile to stm32 cpu 2020-09-02 11:30:49 +02:00
91c9b8c1b0
cpu/stm32: remove hardcoded CPU_IRQ_NUMOF defines 2020-09-02 11:30:49 +02:00
39d95b1950
cpu/stm32: add tool to generate a header with IRQ numof defines 2020-09-02 11:30:49 +02:00
hugues
6959a905a2 cpu/stm32/include/periph/f3/periph_cpu.h: add ADC support 2020-08-27 15:43:43 +02:00
5fab8f7a9a
stm32: Add define for when DMA channel selection is not supported
This adds a placeholder define for when the DMA peripheral available on
the MCU doesn't support channel/trigger filtering. This is the case on
the stm32f1 and stm32f3 family.
2020-08-19 16:09:55 +02:00
b9d62e47d3
stm32: Add support for arbitrary SPI clock rates 2020-08-18 16:55:01 +02:00
benpicco
22d3bf7c51
Merge pull request #14594 from maribu/stm32-eth-cleanup
cpu/stm32: Clean up / fix periph_eth
2020-08-17 21:16:27 +02:00
Marian Buschsieweke
4fcf37c162
cpu/stm32/periph_eth: Handle lost & spurious IRQs
Fixes https://github.com/RIOT-OS/RIOT/issues/13496
2020-08-17 20:30:16 +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
Marian Buschsieweke
932c311ee2
cpu/stm32/periph_eth: Fix RX logic
If any incoming frame is bigger than a single DMA buffer, the Ethernet DMA will
split the content and use multiple DMA buffers instead. But only the DMA
descriptor of the last Ethernet frame segment will contain the frame length.

Previously, the frame length calculation, reassembly of the frame, and the
freeing of DMA descriptors was completely broken and only worked in case the
received frame was small enough to fit into one DMA buffer. This is now fixed,
so that smaller DMA buffers can safely be used now.

Additionally the interface was simplified: Previously two receive flavors were
implemented, with only one ever being used. None of those function was
public due to missing declarations in headers. The unused interface was
dropped and the remaining was streamlined to better fit the use case.
2020-08-17 20:28:49 +02:00
Marian Buschsieweke
234a720571
Merge pull request #14516 from benpicco/bitband_hw
cortexm_common: fix check for bitbanding feature
2020-08-08 14:26:49 +02:00
millotp
69858916c7 boards: enable CAN bus on nucleo-f446re & nucleo-f446ze
Changed the pinout for the CAN bus:
CAN RX: PB8
CAN TX: PB9

And added periph_can to FEATURES_PROVIDED and to Kconfig files
2020-07-27 14:36:29 +02:00
Marian Buschsieweke
a5dbec33d9
cpu/stm32/periph_eth: Cleanup & fix DMA descriptor
- Add missing `volatile` to DMA descriptor, as memory is also accessed by the
  DMA without knowledge of the compiler
- Dropped `__attribute__((packed))` from DMA descriptor
    - The DMA descriptor fields need to be aligned on word boundries to
      properly function
    - The compiler can now more efficiently access the fields (safes ~300 B ROM)
- Moved the DMA descriptor struct and the flags to `periph_cpu.h`
    - This allows Doxygen documentation being build for it
    - Those types and fields are needed for a future PTP implementation
- Renamed DMA descriptor flags
    - They now reflect to which field in the DMA descriptor they refer to, so
      that confusion is avoided
- Added documentation to the DMA descriptor and the corresponding flags
2020-07-26 22:12:03 +02:00
Gunar Schorcht
044d08d599 cpu/stm32: GPIO ports definition fix
The available GPIO ports may also differ within a family. Therefore, the vendor definitions GPIO* are used instad of CPU_FAM_STM definitions to determine which ports are available for a certain MCU.
2020-07-22 09:13:52 +02:00
dada52ecd2
cpu/stm32: add stm32g0 support 2020-07-21 12:45:25 +02:00
8e87dedbce
cpu/stm32: remove not needed CMSIS vendor headers 2020-07-16 17:35:49 +02:00
f21440b176
cpu/stm32: use CMSIS headers from the stm32cmsis package 2020-07-16 17:35:48 +02:00
Benjamin Valentin
8f36c88b93 cpu/stm32: set CPU_HAS_BITBAND 2020-07-16 14:44:28 +02:00
055c43c878
cpu/stm32: enable flashpage feature for stm32f031k6 2020-07-16 11:15:30 +02:00
Bas Stottelaar
21f9afdb5b
Merge pull request #14318 from benpicco/cpu/stm32-TIMER_CHANNELS
cpu/stm32: use TIMER_CHANNEL_NUMOF for consistency
2020-06-24 15:32:22 +02:00
Benjamin Valentin
06cdd30fcb cpu/stm32: use TIMER_CHANNEL_NUMOF for consistency 2020-06-24 12:58:38 +02:00
f546c6238b
cpu/stm32: add support for stm32g4 2020-06-19 14:18:17 +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
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
c28477a4f0
Merge pull request #14096 from bergzand/pr/stm32_common/dma/optimize_hot_path
STM32_common/dma: Optimize the latency in the hot path
2020-06-02 16:01:27 +02:00
9ab7e7ef33
stm32/dma: add setup and prepare functions
This commit adds two new functions to the DMA peripheral code for the
stm32. The setup function allows for a one-time setup of peripheral
config. The prepare function does the per-transfer setup. This allows
for a single setup call during the peripheral lock step and a
per-transfer call to the prepare function.
2020-06-02 11:52:11 +02:00
bdeec688f5
Merge pull request #14174 from benpicco/cpu/stm32_usb_includes
cpu/stm32: don't include usbdev_stm32.h in periph_cpu_common.h
2020-06-02 11:42:19 +02:00
benpicco
7286c32b5d
Merge pull request #14144 from aabadie/pr/cpu/stm32_cleanup_tim_ccr
cpu/stm32: cleanup timer structure in vendor headers
2020-06-01 16:18:57 +02:00
Gabriel Moyano
52ddeeedb0 cpu/stm32: add qdec support for CPU_FAM_STM32F1 2020-05-29 21:11:54 +02:00
e35914612e
cpu/stm32: restore timer structure in vendor headers 2020-05-29 18:22:00 +02:00
2dc0ec00a1
cpu/stm32: adapt timer driver to common CMSIS timer structure 2020-05-29 18:22:00 +02:00
Benjamin Valentin
e957f339d3 cpu/stm32: don't include usbdev_stm32.h in periph_cpu_common.h
`usbdev_stm32.h` will pull in `usb.h` which causes an error if
`USB_H_USER_IS_RIOT_INTERNAL` is not set.

Turns out this include is not needed, so just drop it.
2020-05-29 17:42:19 +02:00
8593176e29
Merge pull request #14140 from aabadie/pr/cpu/stm32_uid_base
cpu/stm32:  get the cpuid address from the UID_BASE constant defined in CMSIS
2020-05-27 08:39:35 +02:00
af8c4a32f6
Merge pull request #14147 from aabadie/pr/cpu/stm32f1_gpio_cleanup
cpu/stm32f1: restore default gpio struct in CMSIS + adapt driver
2020-05-27 08:39:17 +02:00
09c1afe9c5
cpu/stm32l4/wb: restore exti structure in vendor headers 2020-05-26 17:24:59 +02:00
1a8f4d4f25
cpu/stm32f1: restore gpio struct to default in CMSIS header 2020-05-26 16:26:20 +02:00
61d3afcb63
cpu/stm32: remove hardcoded cpuid addr for f1 2020-05-26 15:44:50 +02:00
d78c955e50
cpu/stm32: remove hardcoded cpuid addr for f0 2020-05-26 15:44:50 +02:00
98a30ddadf
cpu/stm32: remove not needed periph_cpu.h for f3 2020-05-26 15:44:50 +02:00
4e33cebb3d
cpu/stm32: remove not needed periph_cpu.h for f7 2020-05-26 15:44:50 +02:00
bf01940ec7
cpu/stm32: use UID_BASE when possible 2020-05-26 15:44:50 +02:00
2313b85a8d
cpu/stm32: use UID_BASE from CMSIS when not defined 2020-05-26 15:44:50 +02:00
8959274165
cpu/stm32: update vendor headers for f1 2020-05-26 11:43:45 +02:00
1e4da87aad
cpu/stm32: update vendor headers for f0 2020-05-26 11:43:44 +02:00
4f96cdbfcd
cpu/stm32: update stm32f334 vendor header 2020-05-26 11:43:44 +02:00
8a5ea2638b
cpu/stm32: update stm32f2 vendor headers 2020-05-26 11:43:44 +02:00
4f30f27e9d
cpu/stm32: update stm32f72x vendor headers 2020-05-26 11:43:37 +02:00
46c4803eba
cpu/stm32: remove useless ifdef around DMA definitions 2020-05-25 13:23:20 +02:00
b6d2231d6d
cpu/stm32: adapt Doxygen documentation 2020-05-20 13:39:11 +02:00
5c810d8535
cpu/stm32: introduce unique directory for stm32 cpus 2020-05-20 13:39:10 +02:00