Marian Buschsieweke
03b7fe8f0c
cpu/esp8266/periph_timer: allow changing callback or freq
...
Allow multiple calls to timer_init(), as this is the only way to
change the timer frequency or the callback function.
2022-11-24 22:39:49 +01:00
Marian Buschsieweke
e8fd65566a
cpu/esp32/periph_timer: allow changing callback or freq
...
Allow multiple calls to timer_init(), as this is the only way to
change the timer frequency or the callback function.
2022-11-24 22:38:15 +01:00
Marian Buschsieweke
fbd7b77331
cpu/nrf5x_common/periph_timer: fix spurious IRQs
2022-11-24 22:36:42 +01:00
Marian Buschsieweke
20fc71dd65
cpu/stm32/periph_timer: fix spurious IRQs
2022-11-24 22:34:10 +01:00
Marian Buschsieweke
93c5755649
cpu/stm32/periph_timer: fix race conditions
...
Allow two threads to share the same timer - provided they use distinct
sets of timer channels - without occasionally corrupting registers or
state flags.
2022-11-24 22:34:03 +01:00
Benjamin Valentin
59a3e613fe
cpu/cortexm_common: measure time spent with IRQ disabled
2022-11-24 21:27:20 +01:00
Marian Buschsieweke
020c6ff69c
Merge pull request #18954 from jue89/fix/nrf5x-uart-lowpower
...
cpu/nrf5x/uart: run STOPTX task after finished tx
2022-11-24 14:20:58 +01:00
Juergen Fitschen
a6ff838a4b
Merge pull request #18933 from jue89/feature/cpu_efm32_series_2_adc
...
cpu/efm32: add periph_adc support for Gecko Series 2
2022-11-24 11:32:56 +01:00
benpicco
86d72c7b85
Merge pull request #18940 from krzysztof-cabaj/nucleo-l496zg-ADC
...
boards/nucleo-l496zg: add ADC support
2022-11-23 20:34:08 +01:00
Marian Buschsieweke
cefef8fd1e
Merge pull request #18953 from jue89/fix/nrf5x-timer-lowpower
...
cpu/nrf5x/timer: fix high current consumption in powered off state
2022-11-23 17:03:33 +01:00
Marian Buschsieweke
232c70ba53
Merge pull request #18948 from maribu/boards/common/nrf52
...
boards/common/nrf52: fix timer config
2022-11-23 10:47:26 +01:00
Jue
3da1faca90
cpu/nrf5x/uart: run STOPTX task after finished tx
...
This reduces power consumption for UARTs that are configured in tx-only mode.
2022-11-22 21:33:14 +01:00
Jue
a7e2182bb0
cpu/nrf5x/timer: run task SHUTDOWN instead of STOP
...
This is a workaround for errata 78 that causes increased current consumption even in the stopped state.
2022-11-22 19:15:31 +01:00
Juergen Fitschen
97bc8252d9
Merge pull request #18920 from jue89/fix/sam0_rtt_rtc
...
sam0/rtc_rtt: optimizations to get around the painful long syncwaits
2022-11-22 18:12:06 +01:00
Juergen Fitschen
18e9167c73
cpu/efm32/adc: add support for Gecko Series 2
...
Series 2 features IADCs instead of ADCs.
2022-11-22 14:44:56 +01:00
Marian Buschsieweke
b533fcf543
cpu/nrf5x_common: improve doc on timer_conf_t::channels
2022-11-22 13:43:05 +01:00
Jue
2a81a2ab5c
cpu/efm32: provide periph_uart_modecfg feature for every board
2022-11-21 23:20:19 +01:00
Jue
80b491d7dd
cpu/efm32/uart: add modecfg support for Gecko Series 2
2022-11-21 23:17:52 +01:00
krzysztof-cabaj
afbb568306
cpu/stm32/l4: add ADC support for l496zg
2022-11-21 05:52:02 -05:00
Marian Buschsieweke
6b759c2a7d
Merge pull request #18935 from benpicco/makefiles/gnu-version
...
makefiles/gnu.inc.mk: set flags based on compiler version
2022-11-20 08:11:57 +01:00
Benjamin Valentin
b30efeeb65
makefiles/gnu.inc.mk: set flags based on compiler version
2022-11-19 23:14:54 +01:00
Benjamin Valentin
dd5c876034
cpu/native: replace RIOT_FILE_RELATIVE with __FILE__
2022-11-19 01:48:42 +01:00
Benjamin Valentin
8777584ac8
cpu/lpc23xx: core: replace RIOT_FILE_RELATIVE with __FILE__
2022-11-19 01:48:42 +01:00
benpicco
e1aa925c35
Merge pull request #18913 from benpicco/macro-prefix-map
...
makefiles/cflags.inc.mk: don't include absolute path in __FILE__ macro
2022-11-18 16:43:35 +01:00
benpicco
2f122769c3
Merge pull request #18921 from benpicco/cpu/stm32-bkup_heap
...
cpu/stm32: add unused backup RAM as extra heap
2022-11-18 15:48:36 +01:00
Benjamin Valentin
6f05daceb3
cpu/stm32: add unused backup RAM as extra heap
2022-11-18 12:19:10 +01:00
Gunar Schorcht
4b7578b2eb
pkg/tinyusb: fix USB speed selection for STM32
2022-11-17 14:07:38 +01:00
Juergen Fitschen
268bdfec29
sam0/rtc_rtt: don't block until set_alarm has been propagated to periph
...
rtc_set_alarm() / rtt_set_alarm() are heavily used by ztimer during ISR. This will reduce time spent during ISR drastically. We trust that the peripheral is able to propagate the alarm asynchronously.
2022-11-16 17:02:19 +01:00
Juergen Fitschen
9c6f07f80a
sam0/rtc_rtt: optimize pm_unblock/pm_block ping-pong during set alarm
2022-11-16 16:54:29 +01:00
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
Benjamin Valentin
5b359108f7
cpu/esp8266: blacklist -fmacro-prefix-map
...
This requires at least GCC 8
2022-11-15 20:39:49 +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
Benjamin Valentin
0bd67d98d9
cpu: always rely on stdio.inc.mk for default stdio selection
2022-11-09 10:42:47 +01:00
benpicco
8559472179
Merge pull request #18821 from jue89/feature/saml21_pheriph_pm
...
cpu/saml21: add interaction with pm_layered for peripheral drivers
2022-11-07 19:53:57 +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
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
24461b43f8
cpu/sam0/spi: generalize pm_layered interaction
...
In DMA mode SPI transfers are carried out by HW. We need to block certain pm modes during transfer.
2022-11-03 14:53:44 +01:00
Jue
db9263eeca
cpu/sam0/rtc_rtt: integrate pm_layered
2022-11-03 14:53:43 +01:00
Jue
cc4e880aa8
cpu/sam0/rtc: remove overflow IRQ
...
Due to the RIOT_EPOCH of 2020 this overflow will happen in year 2084. It would be scary if IoT devices are still around then.
We can save RAM and ROM. Furthermore, this overflow handling should block BACKUP power mode in order to keep track of the reference year.
2022-11-03 14:52:38 +01:00
Jue
5866262122
cpu/sam0/usbdev: generalize pm_layered interaction
...
periph_cpu.h should define the required pm modes.
Additionally, some CPUs require a certain pm mode in USB IDLE mode.
2022-11-03 14:27:47 +01:00
Jue
220be1da7e
cpu/sam0/gpio: integrate pm_layered
2022-11-03 14:27:47 +01:00
Jue
ae9190da30
cpu/sam0/uart: integrate pm_layered
2022-11-03 14:27:47 +01:00
Jue
aa5ad12f37
cpu/sam0/uart: skip uart_write() if uart isn't active
...
Otherwise we get stuck in an endless loop ...
2022-11-03 14:27:47 +01:00
Jue
cf5e207d62
cpu/sam0/uart: enable peripheral clock before accessing regs
2022-11-03 14:27:47 +01:00
Jue
4f25c1017d
cpu/sam0/timer: integrate pm_layered
2022-11-03 14:27:47 +01: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
Gunar Schorcht
ccbb304eae
Merge pull request #18814 from jue89/fix/efm32_series2_timer
...
cpu/efm32/timer_series2: fix interaction with pm_layered
2022-11-02 16:30:13 +01:00
Jon-Mailes Graeffe
b0686ce4dd
cpu/esp32: set bootloader XTAL frequency configuration to automatic
2022-11-01 03:22:38 +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
krzysztof-cabaj
f82f856c63
cpu/cc26xx_cc13xx: remove broken HTML links and headings from doc
2022-10-28 08:57:17 -04:00
Jue
54e915e40d
cpu/efm32/timer_series2: sync STATUS register
...
Make sure the STATUS register has been synced between the different clock domains.
Especially the LETIMER needs some time to update the STATUS register after it has been enabled. If the LETIMER is started and stopped with just a short delay, pm_layered gets confused because the timer seems to be inactive ...
2022-10-28 11:34:55 +02:00
Jue
e6d18af3ad
cpu/efm32/timer_series2: fix timer_start() interaction with pm_layered
...
The timer hasn't been enabled yet, if the STATUS isn't RUNNING, yet ...
2022-10-28 11:34:55 +02:00
Juergen Fitschen
41251507a2
Merge pull request #18806 from jue89/fix/efm32_startup
...
cpu/efm32: include periph_conf.h for system-related methods
2022-10-27 23:26:42 +02: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
Juergen Fitschen
6190738bf0
cpu/efm32: include periph_conf.h for system-related methods
...
This allows boards to define different crystal frequencies. The correct frequency is required by the system-related methods to ensure proper function of the underlying emlib.
2022-10-27 15:22:58 +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
Juergen Fitschen
0151279ffe
Merge pull request #18780 from jue89/feature/efm32-series2
...
EFM32: add cpu family EFR32ZG23 and board xG23-PK6068A
2022-10-26 19:18:30 +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
Martine Lenders
669e21c7f5
Merge pull request #18735 from Teufelchen1/chore/native_macos
...
boards/native: Remove macOS as native target
2022-10-26 12:48:00 +02:00
Teufelchen1
35a06c4806
boards/native: Remove macOS as native target
2022-10-25 19:11:23 +02:00
Jue
ee2f5e981c
cpu/efm32: add efr32zg23 family
...
Generated with the EFM2RIOT tool: https://github.com/basilfx/EFM2RIOT
2022-10-24 23:16:39 +02:00
Jue
2ce1df5cd6
cpu/efm32/wdt: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
ccf327a32b
cpu/efm32/hwrng: add series 2 periph driver
2022-10-24 23:16:39 +02:00
Jue
53e444ebc7
cpu/efm32/i2c: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
2c2790dde2
cpu/efm32/spi: add series 2 support
2022-10-24 23:16:39 +02:00
Jue
568448f68c
cpu/efm32/timer: add series 2 periph driver
2022-10-24 23:16:39 +02:00
Jue
42c9a3c9f1
cpu/efm32/uart: add series 2 periph driver
2022-10-24 23:16:38 +02:00
Jue
2b1a260c43
cpu/efm32/gpio: fix clock enable sequence for series 2
2022-10-24 23:16:38 +02:00
Jue
1c60c95733
cpu/efm32: setup EM4 mode for series 2 CPUs
2022-10-24 23:16:38 +02:00
Jue
775861510c
cpu/efm32: allow series 2 boards to setup clock trees flexibly
2022-10-24 23:16:38 +02:00
Benjamin Valentin
04287b4795
cpu/cortexm_common: improve formatting of irq_arch.h
2022-10-24 18:08:33 +02:00
benpicco
21956db2fd
Merge pull request #18776 from gschorcht/pkg/tinyusb_otg_hs_ulpi
...
pkg/tinyusb: add ULPI and UTMI+ HS PHY support for STM32 USB OTG HS ports
2022-10-21 20:19:23 +02: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
benpicco
f02113081b
Merge pull request #18779 from benpicco/socket_zep-crc16_ccitt
...
socket_zep: make use of crc16_ccitt_false_update()
2022-10-21 11:01:56 +02:00
Benjamin Valentin
2bb657c72c
socket_zep: make use of crc16_ccitt
2022-10-20 13:08:30 +02:00
Juergen Fitschen
67b380034a
cpu/efm32/pm: add debug output
2022-10-19 18:17:43 +02:00
Juergen Fitschen
360b36af16
cpu/efm32/pm: allow blocking EM1
...
Aligns pm logic to #17883
2022-10-19 17:51:12 +02:00
Juergen Fitschen
dc8fe69789
cpu/efm32: satisfy vera++
2022-10-18 23:30:08 +02:00
Jue
68625e5aa9
cpu/efm32/gpio: block power modes if IRQs are enabled
2022-10-18 23:30:08 +02:00
Jue
f6016d3999
cpu/efm32: keep debug unit active during EM2 when DEVELHELP is active
2022-10-18 17:34:27 +02:00
Jue
bc51071d44
cpu/efm32: define EFM power modes for pm_layered
2022-10-18 17:34:27 +02:00
Jue
b3989bc11f
cpu/efm32: remove ADC defintion for CPUs without ADC
...
Gecko Series 2 is shipped with a new IADC peripheral which is backed by its own emlib driver.
2022-10-18 16:39:18 +02:00
benpicco
da5cd8fa88
Merge pull request #18755 from gschorcht/boards/sltb009a
...
boards: add support for EFM32GG12 Thunderboard Kit (SLTB009A)
2022-10-18 11:12:28 +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
Gunar Schorcht
d9dbaa3c2c
cpu/esp32s{2,3}: DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE must not overridable
...
Since the total USB OTG FIFO size is a hardware propertie, it must not be overridable.
2022-10-17 20:03:51 +02:00
Gunar Schorcht
59a84285ae
cpu/esp32s{2,3}: fix MODULE_USBDEV_SYNOPSYS_DWC2 dependency in Kconfig
...
`MODULE_USBDEV_SYNOPSYS_DWC2` depends already on `HAS_PERIPH_USBDEV`.
2022-10-17 20:03:23 +02:00
Gunar Schorcht
a7bf2d74ba
cpu/esp32: fix usbdev_synopsys_dwc2 on ztimer_msec
...
The `usbdev_synopsys_dwc2 driver` requires the `ztimer_msec` module and is therefore responsible for pulling it in. Therefore, the dependency on `ztimer_msec` can be removed here.
2022-10-17 20:03:04 +02:00
Gunar Schorcht
550a599da9
cpu/efm32: fix RTT_MAX_VALUE selection
...
EFM32GG12 have both a RTC and a RTCC. `_RTC_CNT_MAX` is used as `RTT_MAX_VALUE` in this case.
2022-10-17 08:19:08 +02:00
Gunar Schorcht
ae98c3e6d3
cpu/efm32: add EFM32GG12 family (generated with EFM2RIOT)
2022-10-17 08:19:08 +02:00
benpicco
4fded73f63
Merge pull request #18742 from maribu/cpu/stm32/KConfig2
...
cpu/stm32: fix periph_usb modeling for STM32F1
2022-10-15 21:13:47 +02:00
Marian Buschsieweke
c58817f839
Merge pull request #18739 from jue89/feature/pkg-gecko_sdk_41
...
pkg/gecko_sdk: Bump to version 4.1.2
2022-10-15 18:11:23 +02:00
Jue
f3d1773483
cpu/efm32/gpio: fix deprecated GPIO_IntConfig() call
2022-10-15 15:43:17 +02:00
Jue
65d4c046a8
cpu/efm32/efr32*: model librail integration
2022-10-15 15:43:17 +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
Marian Buschsieweke
ea0a53521f
Merge pull request #17812 from benpicco/boards/blxxxpill-usb
...
boards/blxxxpill: configure usbdev_fs
2022-10-14 01:10:23 +02:00
Marian Buschsieweke
22c2e85f1d
Merge pull request #18641 from maribu/cpu/arm7_common/alignment
...
cpu/arm7_common: align stacks correctly
2022-10-13 13:59:18 +02:00
Benjamin Valentin
aa6e8cafcf
cpu/stm32: enable usbdev_fs for STM32F1
2022-10-13 12:00:22 +02:00
benpicco
5f75f7fa7d
Merge pull request #18729 from gschorcht/cpu/stm32/periph/usbdev_fs/pma_access
...
cpu/stm32/periph/usbdev_fs: support for STM32F1 family
2022-10-13 03:27:01 +02:00
Marian Buschsieweke
f57a15131e
cpu/arm7_common: align stacks correctly
...
`thread_stack_init()` didn't correctly set up the stack alignment.
This fixes the issue and brings the function closer to the Cortex M
version, laying the groundwork for future code duplication.
This fixes https://github.com/RIOT-OS/RIOT/issues/11885
2022-10-12 21:53:16 +02:00
Gunar Schorcht
96fad3fb3b
Merge pull request #18720 from maribu/cpu/esp32/uart
...
cpu/esp_common/periph_uart: fix call to _uart_set_mode
2022-10-12 15:17:01 +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
Martine Lenders
b35a291332
Merge pull request #18718 from MrKevinWeiss/pr/fixnightlies
...
Fix kconfig models breaking nightlies
2022-10-11 15:07:50 +02:00
Gunar Schorcht
65d5d28e09
Merge pull request #18717 from maribu/cpu/esp32/ESP32_SDK_DIR
...
cpu/esp32: move ESP32_SDK_DIR definition here
2022-10-11 11:06:19 +02:00
Marian Buschsieweke
c1a62f316e
cpu/esp32: move ESP32_SDK_DIR definition here
...
The definition in `pkg/esp32_sdk/Makefile.include` was evaluated by
`make` after the include paths were already set, resulting in
`ESP32_SDK_DIR` being empty in
INCLUDES += -I$(ESP32_SDK_DIR)/components
[...]
This in turn resulted in
cc1: error: /components: No such file or directory [-Werror=missing-include-dirs]
[...]
2022-10-10 20:39:47 +02:00
Marian Buschsieweke
6d874c2882
cpu/esp_common/periph_uart: fix call to _uart_set_mode
...
The parameters for parity and stop bits was confused, resulting in
the following compilation error with GCC 12.2.0:
/home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c: In function '_uart_config':
/home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:394:61: error: implicit conversion from 'uart_stop_bits_t' to 'uart_parity_t' -Werror=enum-conversion]
394 | if (_uart_set_mode(uart, _uarts[uart].data, _uarts[uart].stop,
| ~~~~~~~~~~~~^~~~~
/home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:395:42: error: implicit conversion from 'uart_parity_t' to 'uart_stop_bits_t' -Werror=enum-conversion]
395 | _uarts[uart].parity) != UART_OK) {
| ~~~~~~~~~~~~^~~~~~~
cc1: all warnings being treated as errors
This swaps the parameters.
2022-10-10 14:27:27 +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
Benjamin Valentin
cd9c8c354e
cpu/esp32: allow GPIO_UNDEF in SPI config
...
e.g. a display or string of LEDs might not have a MISO pin defined
2022-10-08 22:02:49 +02:00
Benjamin Valentin
2b2298b796
cpu/esp32: implement periph_spi_reconfigure
2022-10-08 22:02:49 +02:00
Marian Buschsieweke
90c92797bd
Merge pull request #18697 from kaspar030/cortexm_clear_fpu_state_on_thread_exit
...
cpu/cortexm: clear FPU state in `cpu_switch_context_exit()`
2022-10-06 19:05:38 +02:00
5cc43e5d5e
cpu/cortexm: clear FPU state in cpu_switch_context_exit()
2022-10-05 22:17:26 +02:00
Dylan Laduranty
d7d91935a4
Merge pull request #18680 from gschorcht/drivers/usbdev_stm32f3
...
cpu/stm32/periph/usbdev_fs: add support for STM32F3 family
2022-10-05 18:35:53 +02:00
Dylan Laduranty
1a1b41bea5
Merge pull request #18688 from benpicco/cpu/sam0_common-muxpos
...
cpu/sam0_common: ADC keep muxpos as legacy define
2022-10-05 16:56:26 +02:00
Marian Buschsieweke
f02bc5791a
Merge pull request #18571 from maribu/sys/tiny_strerror
...
sys/tiny_strerror: add tiny `strerror()` implementation
2022-10-05 09:24:40 +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
Benjamin Valentin
5843ff4127
cpu/sam0_common: ADC keep muxpos as legacy define
2022-10-04 15:45:25 +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
Dylan Laduranty
11aebb6003
Merge pull request #18592 from gschorcht/pkg/tinyusb
...
pkg/tinyusb: add tinyUSB as package
2022-10-04 13:08:36 +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
Marian Buschsieweke
3227fb3b17
Merge pull request #18619 from maribu/core/mutex/cleanup
...
core/mutex: clean up
2022-10-03 10:58:07 +02:00
benpicco
da6b16da7e
Merge pull request #18669 from benpicco/mtd_native_ftell
...
cpu/native: get mtd size from file size
2022-10-01 16:47:48 +02:00
Gunar Schorcht
76848492b0
cpu/stm32: add tinyUSB package support
2022-09-30 19:05:51 +02:00
Gunar Schorcht
8696783853
cpu/esp32: enable tinyUSB package for ESP32-S2 and ESP32-S3
2022-09-30 19:05:51 +02:00
3ee3d1b9ac
Merge pull request #18562 from MrKevinWeiss/pr/removemips
...
cpu/mips: Remove all mips
2022-09-30 10:47:09 +02:00
Benjamin Valentin
debdbf91d9
cpu/native: get mtd size from file size
2022-09-29 14:55:30 +02:00
Benjamin Valentin
0aa931ad7d
cpu/native: povide real_ftell() function
2022-09-29 14:55:27 +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