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

3970 Commits

Author SHA1 Message Date
Marian Buschsieweke
646a7b79c8
cpu/nrf5x_common: Use NETOPT_MAX_DPU_SIZE
Updated nrfmin to use NETOPT_MAX_DPU_SIZE instead of the deprecated
NETOPT_MAX_PACKET_SIZE
2019-02-18 20:18:52 +01:00
Marian Buschsieweke
7a05fc09f3
cpu/esp_common: Use NETOPT_MAX_PDU_SIZE
Updated esp_now to use NETOPT_MAX_PDU_SIZE instead of the deprecated
NETOPT_MAX_PACKET_SIZE.
2019-02-18 20:18:50 +01:00
ZetaR60
1f9e1857f7
Merge pull request #9130 from kYc0o/cpu/atmega/unify_stacks
atmega: refactor cpu/board code and build/flash variables
2019-02-08 18:07:22 -05:00
Gunar Schorcht
f4a9f5a0d6 cpu/esp8266: netstats removed from esp_wifi 2019-02-07 15:44:04 +01:00
Sebastian Meiling
6037fa2536
Merge pull request #9666 from OYTIS/s9kea-pr1
kinetis: add support for S9KEAZ128
2019-02-07 11:44:36 +02:00
Yegor Yefremov
97d0851de1 cpu/stm32_common: fix UART documentation
Don't include overridden typedefs into doxygen as otherwise,
they'll appear twice.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-02-06 12:46:27 +01:00
Sebastian Meiling
3e5658d407
Merge pull request #10662 from gschorcht/esp32_gpio_fix
cpu/esp32: GPIO macro cleanup in periph_cpu.h
2019-02-05 22:23:09 +02:00
Francisco Acosta
2bdcdddd76 cpu/atmega*: make use of common atmega.inc.mk and remove redundancies
Everything is now defined in atmega.inc.mk, following the common
RIOT-like reusability of rules and variables (e.g. cortexm.inc.mk).
2019-02-05 17:12:03 +01:00
5a35e6e109
Merge pull request #10825 from maribu/fe310_periph_init
cpu/fe310: Add call to periph_init()
2019-02-05 13:12:45 +01:00
Martine Lenders
7220b66708
Merge pull request #10936 from miri64/sam0_common/fix/check-adc-numof
sam0_common: check ADC_NUMOF on adc_init()
2019-02-04 16:41:41 +01:00
Kees Bakker
458c95a854
Merge pull request #10914 from keestux/describe-saml1x-source
cpu/sam0_common: update README for SAML1x addition
2019-02-04 16:29:15 +01:00
Gunar Schorcht
d9706d1cd5 cpu/esp32: GPIO macro cleanup in periph_cpu.h
The default macros GPIO_PIN and GPIO_UNDEF do not have to be overridden. The GPIO_PIN macro definition was even wrong for 40 GPIOs without splitting into ports, even if that did not lead to erroneous behavior.
2019-02-04 14:31:53 +01:00
Martine Lenders
39e90502af sam0_common: check ADC_NUMOF on adc_init() 2019-02-04 09:28:13 +01:00
Kees Bakker
e4325ed802 cpu/sam0_common: update README for SAML1x addition
Rewrite the README to reflect the recent addition of SAMR30 and
SAML10/SAML11.
2019-02-01 23:33:31 +01:00
Dylan Laduranty
3995fd8761
Merge pull request #10880 from fedepell/sam0_write_intflag
sam0 flashpage: wait for READY bit in INTFLAG after write command
2019-02-01 21:55:08 +01:00
aa90f93de3
Merge pull request #10891 from kaspar030/fix_native_thread_yield_higher
cpu/native: fix race in thread_yield_higher()
2019-02-01 16:10:54 +01:00
smlng
6183d5f5c5 netdev: remove layer2 netstats from netdev drivers
Removing usage of netdev->stats in all net drivers, as it is
handled by gnrc_netif.
2019-02-01 11:25:27 +02:00
Kevin "Bear Puncher" Weiss
1d693403b6
Merge pull request #10743 from yegorich/uart-enhanced-settings
RFC: UART enhanced settings
2019-01-31 17:11:28 +01:00
Yegor Yefremov
60f745a033 cpu/stm32_common: add support for uart_mode routine
Add support for specifying data bits, stop bits and parity at
runtime.

Introduce feature periph_uart_modecfg for uart_mode() till all
other CPUs implement it.

STM32 L1, F1, F2, F4 supports following modes:

* 7E1, 7E2
* 7O1, 7O2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

STM32 L0, L4, F0, F3, F7 supports following modes:

* 6E1, 6E2
* 6O1, 6O2
* 7E1, 7E2
* 7O1, 7O2
* 7N1, 7N2
* 8N1, 8N2
* 8E1, 8E2
* 8O1, 8O2

Use USART_CR1_M1 macro to detect 7-bit support because
even inside one family there could be devices that don't
support 7-bit mode. So just using a family macro is not
enough.

As stated in the datasheets for L0, L4, F0, F3, F7 devices,
data bits can only be changed when UART is disabled (UE=0).
Introduce uart_stop() routine to satisfy this requirement.

STM32 UART adds parity to the MSB of a byte to send. The same
also applies to the received bytes. As a result this bit must
be masked in order to get the pure data.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-01-31 14:15:20 +01:00
21dda9474e
Merge pull request #10794 from aabadie/pr/cpu/saml21_exti_fix
cpu/saml21: extend and fix exti configuration for saml21 variants
2019-01-30 12:34:21 +01:00
7cf3510b64
cpu/saml21: extends exti configuration for saml21 variants
Added a configuration for saml21g18a and fixes the configuration for samr30g18a
2019-01-30 09:32:59 +01:00
Gunar Schorcht
66c4cf8647 cpu/esp8266: avoid WiFi going into sleep mode 2019-01-30 08:27:21 +01:00
Federico Pellegrin
318f0cf679 sam0 flashpage: make ready check inline, add wait also after PBC 2019-01-30 04:29:23 +01:00
Gunar Schorcht
57fdb23464 cpu/esp8266: fix compile problems 2019-01-29 23:25:31 +01:00
Federico Pellegrin
409d83e087 sam0 flashpage: minor code style fixes 2019-01-29 20:58:46 +01:00
Gunar Schorcht
975fba8265 cpu/esp8266: check free heap before pbuf alloc
Checking by the send function that at least two maximum size Ethernet frames fit in the remaining heap before the LwIP packet buffer is allocated seems to increase stability. This can be caused by the fact that WLAN hardware interrupts allocate additional memory when receiving a frame during the send attempt.
2019-01-29 18:16:21 +01:00
62bb4cc526 cpu/native: fix race condition in thread_yield_higher()
Error case:
1. thread_yield_higher() stores the thread's ucontext
2. creates an "isr ucontext" for isr_thread_yield, switches to it

Case 1: no signals are pending, continues in isr_thread_yield()
3a. sched_run is called
4a. return to sched_active_thread ucontext

Case 2: signals pending (the crashing scenario), continues in native_irq_handler()
3b. handles signals
4b. if sched_context_switch_request is set, call sched_run
5b. return to sched_active_thread ucontext

4b misses the call to sched_run(), leading to a possible return into a
non-ready thread.
2019-01-28 17:12:01 +01:00
Gunar Schorcht
c81138367b cpu/esp8266: dbg msg replaced by an error msg
The situation where the firmware `lwIP` packet buffer is exhausted is an important indication that the traffic sent to and sent from the esp8266 is more than the esp8266 is able to handle. Therefore, it should be an error message.
2019-01-27 12:14:18 +01:00
Federico Pellegrin
051be66b76 sam0 flashpage: wait for READY bit in INTFLAG after write command 2019-01-27 07:39:10 +01:00
Gunar Schorcht
fa48e3f51f cpu/esp8266: event handling for link up/down 2019-01-26 17:34:13 +01:00
Gunar Schorcht
4e41afa2fb cpu/esp8266: readable disconn reasons in esp_wifi 2019-01-26 17:33:28 +01:00
Gunar Schorcht
1a8a560bb5 cpu/esp8266: remove timeout handling in send func
It is not necessary to realize timeout handling in send function or to disconnect from AP if lwIP packet buffer is exhausted. Waiting that the frame allocated in lwIP packet buffer is freed by MAC layer led to the complete blockage of send function on heavy network load. Disconnecting from AP is counterproductive since reconnecting usually fails on heavy network load.
2019-01-26 17:32:04 +01:00
Gunar Schorcht
fa5fe7e48f cpu/esp8266: don't disconnect on pbuf full in send
Disconnecting from the AP in the send function if the lwIP packet buffer is exhausted is counterproductive since reconnecting usually fails on heavy network load. A better strategy is to slow down the sending of MAC frames from netif a bit to wait for flushing the buffer in the MAC layer.
2019-01-26 17:23:21 +01:00
Anton Gerasimov
19d2ef736c kinetis: limit scope of a variable in ics.c to make Codacy happy
Signed-off-by: Anton Gerasimov <tossel@gmail.com>
2019-01-26 15:53:05 +01:00
Anton Gerasimov
40bcfc9211 kinetis: add support for S9KEAZ128
Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
2019-01-26 15:53:05 +01:00
Gunar Schorcht
5d0b447209 cpu/esp8266: auto reconnect in esp_wifi
It seems to be more stable and less memory consuming to use auto reconnect policy.
2019-01-25 23:59:42 +01:00
Gunar Schorcht
457ef97d74 cpu/esp8266: lwIP dummy functions added
Defines a number of lwIP functions that are required as symbols by Espressif's SDK libraries. These functions are only dummies without real functionality. Using these functions instead of real lwIP functions provided with the SDK saves arround 4 kBytes of RAM.
2019-01-25 23:59:42 +01:00
Gunar Schorcht
24b71a7fbe cpu/esp8266: call _recv directly in esp_wifi
Since _esp_wifi_recv_cb is not executed in interrupt context but in the context of the `ets` thread, it is not necessary to pass the`NETDEV_EVENT_ISR` event first. Instead, the receive function can be called directly which result in much faster handling, a less frame lost rate and more robustness.
2019-01-25 23:59:42 +01:00
Gunar Schorcht
f12606d7c0 cpu/esp8266: removes the mutex in esp_wifi
Since _esp_wifi_recv_cb is not executed in interrupt context but in the context of the `ets` thread, the receive function can be called directly. There is no need for a mutex anymore to synchronize the access to the receive buffer between _esp_wifi_recv_cb and _recv function.
2019-01-25 23:59:42 +01:00
Hauke Petersen
93e7d88f75
cpu/nrf5x: reworked and fixed UART driver 2019-01-25 15:52:25 +01:00
cb8c2b759e
cpu/nrf52: use UARTE device type for nrf52840
This requires to implement the use of EasyDMA for this kind of peripheral
2019-01-25 15:52:25 +01:00
336851e3bc
cpu/nrf52: add uart flow control on nrf52840 2019-01-25 15:51:50 +01:00
8e8f48f75e
cpu/nrf52: add multi UART support for nrf52840 2019-01-25 15:51:49 +01:00
55e50d3015
Merge pull request #10858 from miri64/socket_zep/fix/ubsan-timestamp
socket_zep: fix undefined timestamp conversion behavior
2019-01-25 09:13:07 +01:00
Martine Lenders
83bc4b162f socket_zep: fix undefined timestamp conversion behavior 2019-01-24 14:05:31 +01:00
Sebastian Meiling
907b761750
Merge pull request #10792 from gschorcht/esp8266_esp_wifi_netdev
esp8266: esp_wifi netdev driver
2019-01-24 12:09:46 +01:00
Gunar Schorcht
49f06efd38 cpu/esp8266: fix pbuf length check in esp_wifi
When the size of a received frame is checked, always the total length should be used instead of the length of the first lwIP pbuf in the pbuf chain. Otherwise, the check that the length does not exceed ETHERNET_MAX_LEN will always be true since the maximum size of one lwIP pbuf in a pbuf chain is 512 bytes.
2019-01-24 09:54:53 +01:00
Gunar Schorcht
88c65aff0b cpu/esp8266: allow _esp_wifi_recv_cb during send
Receiption of a frame in _esp_wifi_recv_cb while sending has no effect and should be possible to increases the performance.
2019-01-24 09:39:45 +01:00
Gunar Schorcht
0920bbb4fb cpu/esp8266: log message on reconnect in esp_wifi 2019-01-24 09:21:17 +01:00
Gunar Schorcht
92f6c1a7c6 cpu/esp8266: WiFi mode changed in esp_wifi
Although only the station interface is needed, the WiFi interface has to be used in SoftAP + Station mode. Otherwise the send function blocks sporadically. Since the SoftAP interface is not used, it is configured with a hidden SSID and a long beacon interval. Connections from other stations are not allowed.
2019-01-24 09:21:17 +01:00