49a3592f92
Merge pull request #15849 from benpicco/cpu/stm32f7-adc
...
cpu/stm32: add periph_adc for STM32F7
2021-01-25 13:12:22 +01:00
5fef40ab5a
cpu/stm32/clk: cleanup common clock configuration
2021-01-25 11:46:35 +01:00
dfed1b0567
cpu/stm32: merge g0 and g4 clock configuration headers
2021-01-25 11:46:34 +01:00
0aadf367cc
cpu/stm32: rework common clock source selection header
2021-01-25 11:46:34 +01:00
Francisco
947c63666e
Merge pull request #15834 from leandrolanzieri/pr/cpu/stm32/kconfig_features_conflict_fix
...
cpu/stm32/kconfig: fix rtt/rtc error symbol
2021-01-25 10:15:32 +01:00
Leandro Lanzieri
2e2dcd5c27
cpu/msp430: move default module to Makefile.default
2021-01-25 09:17:00 +01:00
AravindKarri
63252d17c0
cpu/stm32/adc_f4: add support for stm32f7
2021-01-24 22:30:49 +01:00
Benjamin Valentin
00a467e86d
cpu/sam0_common: SPI: allow to only configure MOSI/CLK
...
Some slave devices (e.g. LED strips) don't have a back-channel and
will only need MOSI and CLK.
2021-01-24 17:51:44 +01:00
Leandro Lanzieri
e5aca465bd
cpu/stm32/kconfig: fix rtt:rtc error symbol
...
It only exists conflict between the usage of RTC and RTT on the F1
family, but the error symbol was being set for all of them. This fixes
the issue.
2021-01-23 09:59:03 +01:00
b57b3d490d
cpu/fe310: Allow using immediates for ecall arguments
...
The mv instruction (which is usually implemented as `add rd, x0, r1`) is
changed to `add rd, x0, %input`. This can either be used as a load
immediate or as an move.
The code size grows by two bytes. This because GCC does not compress the
li instruction to the compressed version (even though this is possible).
2021-01-22 20:49:52 +01:00
896227ab08
cpu/fe310: Add used registers to clobbers
2021-01-22 20:49:17 +01:00
benpicco
46337efd93
Merge pull request #15783 from maribu/stm32_eth_fix_error_handling
...
cpu/stm32/periph_eth: fix error handling in send()
2021-01-22 20:25:25 +01:00
benpicco
4c403d6559
Merge pull request #15788 from bergzand/pr/core/inline_thread_yield_higher
...
core/thread: Allow for inline thread_yield_higher
2021-01-22 20:25:11 +01:00
benpicco
1a30a3a280
Merge pull request #15707 from ML-PA-Consulting-GmbH/fix/20210105__sam0_common-periph-flashpage__fix_unaligned_write
...
sam0_common/periph/flashpage: fix unaligned write
2021-01-22 20:24:53 +01:00
Marian Buschsieweke
0d432b59fe
Merge pull request #15840 from benpicco/cpu/atmega-rm_ldscripts_compat
...
cpu/atmega*: drop ldscripts_compat
2021-01-22 20:20:57 +01:00
Benjamin Valentin
236c4db83e
cpu/atmega*: drop ldscripts_compat
...
Those were only needed with very old toolchains.
These days they cause more confusion than benefit, so drop them.
2021-01-22 19:05:20 +01:00
benpicco
e1052f0152
Merge pull request #15833 from yarrick/esp_emac_debug
...
cpu/esp32: Add newline to emac_main debug prints
2021-01-22 14:36:24 +01:00
517fc585b1
cpu/native: Add dummy thread_arch.h header
2021-01-22 09:21:46 +01:00
Erik Ekman
1d6aa2e865
cpu/esp32: Add newline to emac_main debug prints
2021-01-21 20:55:02 +01:00
Benjamin Valentin
f11fc64af6
cpu/sam0_common: PWM: fix build on samd20
...
There is no SYNCBUSY register, so the dummy fallback does not work.
This code path is not used anyway, so just ifdef it out.
2021-01-21 20:29:15 +01:00
b1f7fd3905
cpu/stm32: fix wrong max clock for stm32f423xx line
2021-01-21 18:31:15 +01:00
84dfc88ca3
cpu/arm7_common: Inline thread_yield_higher function
2021-01-20 10:37:42 +01:00
Marian Buschsieweke
21264b80cf
cpu/stm32/periph_eth: improve debugging output
...
Add ENABLE_DEBUG_VERBOSE flag, so that the noise during debugging can be
reduced. This is super helpful when testing under load, as otherwise there is
just too much noise in the output.
2021-01-20 10:36:59 +01:00
Marian Buschsieweke
788f997452
cpu/stm32/periph_eth: fix error handling
...
An earlier version of periph_eth used to always pack the first chunk of the
outgoing frame to the first DMA descriptor by telling the DMA to jump back
to the first descriptor within the last descriptor. This worked fine unless
the frame was send in one chunk (as e.g. lwip does), which resulted due to a
hardware bug in a frame being send out twice. For that reason, the behavior was
changed to cycle throw the linked DMA descriptor list in round-robin fashion.
However, the error checking was not updated accordingly. Hence, the error
check might run over (parts of) unrelated frames and fail to detect errors
correctly.
This commit fixes the issue and also provides proper return codes for errors.
Additionally, an DMA reset is performed on detected errors during RX/TX. I'm
not sure if/when this is needed, as error conditions are neigh impossible to
produce. But better be safe than sorry.
2021-01-20 10:35:05 +01:00
Francisco
4cc6c23ec6
Merge pull request #15809 from maribu/bitband-fix
...
sys/bit: provide CPU_HAS_SRAM_BITBAND
2021-01-20 10:22:04 +01:00
Daniel Lockau
ef7cbdb312
cpu/sam0_common/periph/flashpage: fix unaligned writes
2021-01-20 09:55:47 +01:00
Marian Buschsieweke
716441d0c3
cpu/cortexm_common: fix atomic_utils_arch.h
...
Only use bit-banding if all of SRAM supports bit-banding
2021-01-20 09:19:33 +01:00
Marian Buschsieweke
51db33375a
sys/bit: provide CPU_HAS_SRAM_BITBAND
...
CPU_HAS_SRAM_BITBAND can be used to check whether bit-banding is supported for
all of SRAM. With partially supported bit-banding, this feature is more of a
foot gun that a valuable tool.
2021-01-20 09:18:09 +01:00
e1941d8976
cpu/stm32f2f4f7: expose clock settings in Kconfig
2021-01-19 22:09:16 +01:00
b35e4f4a95
Merge pull request #15796 from fjmolinas/pr_rtc_lock_unlock
...
cpu/stm32/rtc: add unlock/lock to rtc_clear_alarm
2021-01-19 17:29:22 +01:00
Francisco Molina
7c12ea7416
cpu/stm32/rtc: add unlock/lock to rtc_clear_alarm
2021-01-19 13:33:17 +01:00
bce9e3caeb
cpu/msp430_common: Add dummy thread_arch.h header
2021-01-19 11:03:22 +01:00
0b01a999be
cpu/mips32r2_common: Inline thread_yield_higher function
2021-01-19 11:03:21 +01:00
9979646b8b
cpu/fe310: Inline thread_yield_higher function
2021-01-19 11:03:21 +01:00
0129e73ec0
cpu/cortexm_common: Inline thread_yield_higher function
2021-01-19 11:03:21 +01:00
0d43c96ac7
cpu/avr8_common: Add dummy thread_arch.h header
...
The thread_yield_higher function is complex enough to not inline it for
the avr8 cpu
2021-01-19 11:03:21 +01:00
6d3d067443
cpu/cortexm_common: Do not use SVC for cpu_switch_context_exit
...
Directly use the pendsv interrupt instead of chaining through the SVC
interrupt
2021-01-18 16:27:17 +01:00
Leandro Lanzieri
63407b5e5b
cpu/lpc23xx/mci: add module to Kconfig
2021-01-18 10:42:34 +01:00
ba518ede09
cpu/fe310: Uncrustify code
2021-01-15 12:02:55 +01:00
Marian Buschsieweke
253a634b85
Merge pull request #15636 from jia200x/pr/nrf802154/fix_rssi
...
radio/nrf802154: fix set_cca_threshold range
2021-01-14 15:28:29 +01:00
Jose Alamos
f2fa3ca12f
radio/nrf802154: fix set_cca_threshold range
...
This commit fixes the CCA threshold range for set_cca_threshold.
Without this commit the threshold overflows when using values below
the receiver sensitivity.
2021-01-14 14:33:56 +01:00
Jose Alamos
698df63cfb
nrf802154/hal: fix unwanted emissions at the end of ACK frame
...
This commit turns off the transceiver immediately after sending an ACK
frame in order to avoid unwanted emissions (see ERRATA ID 204).
When the radio stays in TX_ON without an explicit transition, the radio
keeps sending a spurious signal for some milliseconds.
2021-01-14 11:06:11 +01:00
Jose Alamos
3c56cdf0c0
cc2538_rf/radio_hal: fix transmit function
...
This commit sets the correct value to the MCU_CTRL bit for the
cc2538_rf. This variable is used to detect when the radio is doing
transmission with CCA. Since this was not set to 1 when sending without
CCA, the `confirm_transmit` function returned -EAGAIN after the TX_DONE
event (which violates the HAL API).
This error was discovered using some Radio HAL riotctrl scripts by @LarsKowoll.
2021-01-14 10:34:50 +01:00
José Alamos
2bf10413d0
Merge pull request #15397 from fjmolinas/pr_ieee802154_crc_error
...
sys/net/iee802154/radio: add IEEE802154_RADIO_INDICATION_CRC_ERROR
2021-01-14 10:29:17 +01:00
Francisco Molina
fe1e16cdc7
sys/net/iee802154/radio: add IEEE802154_RADIO_INDICATION_CRC_ERROR
2021-01-13 23:42:41 +01:00
Francisco Molina
6d4d00ebe9
cpu/nrf52/nrf802154_radio: fix rssi calculation
2021-01-13 19:45:13 +01:00
Francisco Molina
f8bc934785
cpu/cc2538/radio/cc2538_rf_radio_ops: fix rssi reporting
2021-01-13 19:45:11 +01:00
Marian Buschsieweke
605220ce06
Merge pull request #15736 from bergzand/pr/riscv/use_ecall
...
cpu/fe310: Use ecall instruction for thread yield
2021-01-13 14:03:19 +01:00
Marian Buschsieweke
582f8d8430
Merge pull request #15754 from maribu/rssi
...
sys/net/gnrc: fix in-band signaling of no RSSI
2021-01-13 13:28:06 +01:00
5a203413a1
cpu/fe310: Remove software IRQ handling
2021-01-13 12:51:32 +01:00
1b2adb4821
cpu/fe310: Use ecall instruction for thread yield
2021-01-13 12:51:25 +01:00
Marian Buschsieweke
e2c5467d09
cpu/nrf5x_common/radio/nrfmin: drop duplicated code
...
`gnrc_netif_hdr_build()` calls internally `gnrc_netif_hdr_init()`, which does
initialize `gnrc_netif_hdr_t::rssi` and `gnrc_netif_hdr_t::lqi`. So no need to
do this twice.
2021-01-13 08:53:17 +01:00
Benjamin Valentin
3a7aa5d09a
cpu/sam0_common: RTC: add timeout to spurious tamper event
...
Errate 2.17.4 says:
> Upon enabling the RTC tamper detection feature, a false tamper
> detection *can* be reported by the RTC.
It turns out that this spurious event is not always generated.
If RTC alarm is used and the CPU was previously woken from hibernate
by RTC, it *can* happen that the false tamper event is *not* generated.
In this case, we will block indefinitely on the mutex.
To solve this, add a timeout to the event.
Also poll the event instead of using a mutex, as we have already set
`PM->SLEEPCFG.bit.SLEEPMODE` at this point.
2021-01-12 17:36:40 +01:00
Benjamin Valentin
5b11da01c1
cpu/sam0_common: UART: add support for SAMD20
2021-01-12 15:48:39 +01:00
Benjamin Valentin
93d27bb9a0
cpu/sam0_common: I2C: add support for SAMD20
2021-01-12 15:48:39 +01:00
Benjamin Valentin
81e06f46a4
cpu/samd21: add samd20 to Kconfig
2021-01-12 15:48:39 +01:00
Benjamin Valentin
31b8dad147
cpu/samd21: add support for SAMD20
2021-01-12 15:48:39 +01:00
Benjamin Valentin
7b65398ae1
cpu/sam0_common: add samd20 vendor files
...
Files from Atmel.SAMD20_DFP.1.3.165.atpack
2021-01-12 15:48:39 +01:00
Benjamin Valentin
8004aa4d34
cpu/sam0_common: not every CPU has DMA
2021-01-12 15:48:37 +01:00
Leandro Lanzieri
2cf3c603c7
cpu/kinetis/timer: consider no LPTMR when no config present
2021-01-12 15:31:37 +01:00
dylad
bca340d338
cpu/nrf52: update RIOTBOOT_LEN w/ MODULE_USBUS_DFU
2021-01-12 11:34:22 +01:00
dylad
9d02efb4ea
cpu/cortexm_common: increase RIOTBOOT_LEN size when usbus_dfu is used
2021-01-12 11:34:22 +01:00
Martine Lenders
19565f4aea
Merge pull request #15741 from aabadie/pr/boards/lpc1768_common_conf
...
boards/lpc1768: move vendor conf code to CPU level
2021-01-12 10:30:03 +01:00
Sebastiaan de Schaetzen
6e90111eb9
stm32/periph/uart: set flow control bits before enabling uart
2021-01-12 07:37:19 +01:00
Jens Wetterich
450ede0da0
cpu/esp_common: Add missing includes and ISO-C++ compatibility
2021-01-10 18:02:39 +01:00
1090e55683
boards/lpc1768: move vendor conf code to CPU level
2021-01-08 21:47:10 +01:00
b13598cdc4
cpu/stm32: fix ENABLE_DEBUG definition
2021-01-08 14:37:33 +01:00
ba85c2d9ca
cpu/sam0_common: fix ENABLE_DEBUG definition
2021-01-08 14:37:33 +01:00
8dbe37969b
cpu/qn908x: fix ENABLE_DEBUG definition
2021-01-08 14:37:33 +01:00
189f7d862d
cpu/esp32: fix typo in timer documentation
2021-01-08 12:04:24 +01:00
8acf9398e8
Merge pull request #15723 from aabadie/pr/tools/codespell_fixes
...
tools/codespell: fix new typos found by recent version + add new ignored words
2021-01-08 11:01:49 +01:00
b4458e73f2
cpu/esp32: fix typo in Doxygen comment
...
depenend => depend
2021-01-08 10:15:32 +01:00
Leandro Lanzieri
131c0069d8
Merge pull request #15706 from aabadie/pr/cpu/stm32_mco_kconfig
...
cpu/stm32: model MCO clock configuration in kconfig
2021-01-08 09:49:00 +01:00
Bas Stottelaar
31c5c4988e
Merge pull request #15377 from basilfx/feature/efm32_slstk3400a
...
boards/slstk3400a: add support
2021-01-08 07:29:03 +01:00
Gerson Fernando Budke
1426e15679
cpu/avr8_common: Normalize method prefix name
...
Refactor atmega_ prefix to avr8_ prefix and update copyrights.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:42 -03:00
Gerson Fernando Budke
4cbd311196
cpu: Refact atmega_common into avr8_common
...
Split atmega_common code into avr8_common folder. This moves common
avr8 code to be used for all avr8 variants: tiny, mega and xmega.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:29:22 -03:00
Gerson Fernando Budke
a0028a9ff8
cpu/atmega_common: Split cpu.c into atmega_cpu/cpu.c
...
Split cpu.c file into cpu.c and atmega_cpu.c files. This extract mega
specific code from common code.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
Gerson Fernando Budke
4d68dd5aea
cpu/atmega_common: Extract clock definitions
...
Refactor clock definitions from cpu.h to clock.h.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-07 16:17:05 -03:00
d027454ad4
cpu/stm32/kconfig: use depends on instead of if
2021-01-07 16:07:04 +01:00
e8a5493080
cpu/stm32: model MCO in Kconfig for l4/wb
2021-01-07 16:02:30 +01:00
0e39c2ba17
cpu/stm32: model MCO in Kconfig for l0/l1
2021-01-07 16:02:29 +01:00
a9b154b4ac
cpu/stm32: model MCO in Kconfig for g0/g4
2021-01-07 16:02:29 +01:00
1f0e6c1057
cpu/stm32: model MCO in Kconfig for f0/f1/f3
2021-01-07 16:02:29 +01:00
5e719816d2
cpu/stm32/kconfigs: select cpu fam/lines without mco prescaler
2021-01-07 16:02:29 +01:00
Bas Stottelaar
d831a7e746
cpu/efm32: adapt MPU-capable cpus
2021-01-06 23:44:54 +01:00
Bas Stottelaar
ef8985fbbd
cpu/efm32: add support for efm32hg family
2021-01-06 23:44:53 +01:00
Marian Buschsieweke
4714e38911
cpu/atmega_common: drop unused module
...
The module cpu_atmega_common_cxx seems to be non-existing and not used. It is
unclear whether this slipped in by accident or if this was actually useful at
some point in time. In any case, the module is not present (anymore) and cannot
be used, so let's clean up the Makefile.
2021-01-06 20:46:56 +01:00
Marian Buschsieweke
b14ca8318e
Merge pull request #15680 from maribu/msp430-malloc
...
cpu/msp430_common: use malloc_thread_safe
2021-01-03 11:21:03 +01:00
Marian Buschsieweke
cc8070cede
Merge pull request #15681 from maribu/mips-malloc
...
cpu/mips32r2_common: use malloc_thread_safe
2021-01-03 11:20:41 +01:00
Jens Wetterich
e36a0d883a
esp_common/esp_now: use netdev_register()
2020-12-23 19:44:57 +01:00
73d3232f67
Merge pull request #15673 from maribu/fe310-malloc
...
cpu/fe310: use malloc_thread_safe
2020-12-21 13:29:02 +01:00
Marian Buschsieweke
9a61e27f8d
Merge pull request #15679 from maribu/arm7-malloc
...
cpu/arm7_common: use malloc_thread_safe
2020-12-21 10:00:34 +01:00
benpicco
7d8f801b20
Merge pull request #15650 from aabadie/pr/cpu/stm32_clk_merge_f0f1f3
...
cpu/stm32: merge f0/f1/f3 clock configuration headers
2020-12-20 02:31:12 +01:00
iosabi
70113b5fd3
cpu/qn908x: Implement blocking I2C support
...
This initial I2C support allows to use the I2C bus in controller mode to
interact with multiple peripherals in blocking mode. The CPU will
perform a busy wait when transferring data over I2C.
2020-12-19 22:41:57 +00:00
Marian Buschsieweke
7f7bf8454b
cpu/mips32r2_common: use malloc_thread_safe
...
This should fix concurrent dynamic memory allocation.
2020-12-18 18:17:32 +01:00
Marian Buschsieweke
dfb67cef91
cpu/msp430_common: use malloc_thread_safe
...
This should fix concurrent dynamic memory allocation.
2020-12-18 17:30:40 +01:00
Marian Buschsieweke
915d14eb98
cpu/arm7_common: use malloc_thread_safe
...
This should fix concurrent dynamic memory allocation.
2020-12-18 17:23:12 +01:00
Martine Lenders
6646682873
Merge pull request #15611 from benpicco/boards/eui_provider.h
...
net/eui_provider: API cleanup
2020-12-18 15:02:57 +01:00
Marian Buschsieweke
277ddcb108
cpu/cortexm_common: fix select in Kconfig
...
Only select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG is true.
2020-12-18 12:50:33 +01:00
Marian Buschsieweke
b422ef9970
cpu/fe310: use malloc_thread_safe
2020-12-18 10:29:37 +01:00