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

6832 Commits

Author SHA1 Message Date
iosabi
52107b2416 esp8266: Support UART1 and other UART0 pins.
The esp8266 CPU has actually two hardware UART peripherals. UART0 is
used by the boot ROM for flashing and serial output during boot,
typically at a baudrate of 74880 bps until the bootloader or application
sets the more standard 115200 baudrate. This UART0 device has two
possible pins for TXD, GPIO1 and GPIO2, which are both set to TXD by the
boot ROM. esp8266 modules will typically have GPIO1 labeled as the TX
pin, but it is possible to use GPIO2 for that purpose even while
flashing the device with esptool.py.

The second device, UART1, also has two options for TXD, GPIO2 and GPIO7,
and only one option for RXD, GPIO8. However, GPIO7 and GPIO8 are used
by the flash internally so those options are not very useful unless
maybe while running from IRAM with the flash disabled, for example for
a debugger over UART1.

This patch allows boards to override UART{0,1}_{R,T}XD in their
periph_conf.h to configure the uart selection. Defining UART1_TX will
make the UART_DEV(1) device available.

Tested with:

```CFLAGS='-DUART1_TXD=GPIO2' make -C tests/periph_uart BOARD=esp8266-esp-12x flash term```

* Connected one USB-UART to the standard GPIO1 and GPIO3 for flashing
  and console. After flashing we see the manual test output at 115200
  bps

* Connected a second USB-UART with RX to GPIO2 running at 74880.

Then run on the first console:
```
> init 1 74880
> send 1 hello
```

The word "hello" appears on the second UART connection.

Note that GPIO2 is used during boot for UART0's TX until the application
or bootloader set it to a regular GPIO, so some boot ROM messages at
74880 bps are visible. After running `init 1 74880` it is set to UART1's
TX.
2021-05-02 12:27:27 +00:00
benpicco
08f1f9768d
Merge pull request #16418 from fjmolinas/pr_stm32_spi_param_order
cpu/stm32/periph/spi: fix wrong parameter order
2021-04-30 14:37:17 +02:00
benpicco
c1c374db02
Merge pull request #16420 from benpicco/periph/rtt_overflow
cpu: add periph_rtt_overflow feature
2021-04-30 14:37:09 +02:00
benpicco
76cd388dd0
Merge pull request #16304 from iosabi/esp_gdbstub
cpu/esp8266: Fix typo in esp_gdbstub config.
2021-04-30 14:36:50 +02:00
benpicco
b1f8dc3401
Merge pull request #16409 from benpicco/cpu/lpc23xx-flashpage
cpu/lpc23xx: implement periph/flashpage
2021-04-30 14:36:14 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Francisco Molina
fc9fc5c057
cpu/stm32/periph/spi: fix wrong parameter order 2021-04-30 09:17:38 +02:00
4db2a86677
Merge pull request #16414 from seeseemelk/bugfix/late-fpu
Fix Cortex-M hard faults when building with -O3 or -Ofast
2021-04-29 14:21:45 +02:00
Sebastiaan de Schaetzen
e3c9b0c4ca cortexm: initialise fpu early 2021-04-29 13:19:47 +02:00
Benjamin Valentin
51d2dacc33 cpu/lpc23xx: implement periph/flashpage 2021-04-29 13:05:42 +02:00
Benjamin Valentin
49585fc517 cpu/stm32: flashpage: use common helper functions 2021-04-27 16:52:37 +02:00
Gerson Fernando Budke
1dec526d0a cpu/atxmega/periph/i2c: Add i2c driver
Add initial ATxmega i2c master driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-04-25 22:06:23 -03:00
Benjamin Valentin
3f0459288c cpu/sam0_common: ethernet: fix RX detection
Detect RX of frame also when other bits of RSR are set.

fixes #16298
2021-04-23 17:46:36 +02:00
Francisco
9e29754fa9
Merge pull request #16361 from fjmolinas/pr_esp_add_coreclock
cpu/esp*: add CLOCK_CORECLOCK
2021-04-21 16:58:24 +02:00
Francisco
d5f9b99555
Merge pull request #16344 from kfessel/p-efm32-rtt-freq
cpu/efm32: add RTT_FREQUENCY support to efm32
2021-04-21 09:59:10 +02:00
Francisco Molina
5ae5c40f26
cpu/esp*: add CLOCK_CORECLOCK 2021-04-21 08:54:43 +02:00
Akshai M
1f7a10305a stm32/periph/flashpage: Reset cache
Co-authored-by: Francisco <femolina@uc.cl>
2021-04-20 21:04:36 +02:00
Akshai M
efb86039c6 cpu/stm32wl: Add RTT support 2021-04-20 21:04:36 +02:00
Akshai M
2cf081b509 cpu/stm32wl: Flashpage configuration 2021-04-20 21:04:36 +02:00
Akshai M
df1cae172c stm32/irqs: Adapt generators to support WL
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2021-04-20 21:04:36 +02:00
Akshai M
b816c67bdd nucleo-wl55jc: Add Kconfig files 2021-04-20 21:04:35 +02:00
Akshai M
fd8ddd6161 boards: add nucleo-wl55jc
Co-authored-by: Kevin "Tristate Tom" Weiss <weiss.kevin604@gmail.com>
2021-04-20 21:04:29 +02:00
Akshai M
c485c774cf cpu/stm32: add stm32wl 2021-04-20 20:57:48 +02:00
Karl Fessel
fb50acd3f9 cpu/efm32: define rtt attributes 2021-04-20 11:12:45 +02:00
Karl Fessel
4ff30a31e5 cpu/efm32: add RTT_FREQUENCY support to efm32
make efm32 rtt frequency configurable by setting RTT_FREQUENCY
2021-04-20 11:12:45 +02:00
benpicco
bd6114ae9d
Merge pull request #16187 from benpicco/cpu/sam0_common/get_tamper
cpu/sam0_common: add rtc_get_tamper_event()
2021-04-13 14:11:46 +02:00
Benjamin Valentin
13fbb7c1a0 cpu/sam0_common: add rtc_tamper_pin_mask() 2021-04-13 10:45:16 +02:00
Benjamin Valentin
9d482c4448 cpu/sam0_common: RTC: only write TAMPCTRL when tamper is enabled
If we configure TAMPCTRL early, GPIO events will set bits in the
TAMPCTRL register.
That means that after a wake-up, we can't tell if the bit was set
because it was the wake-up source or if it was already set by a
run-time GPIO event.
2021-04-13 10:45:16 +02:00
Benjamin Valentin
73dbda99ac cpu/sam0_common: add rtc_get_tamper()
Add a function to query which tamper event woke the CPU from hibernation.
2021-04-13 10:45:16 +02:00
Hauke Petersen
e28ec7907b
Merge pull request #15806 from haukepetersen/opt_nrf5x_nrfblehfxo
cpu/nrf/radio/nrfble: request HFXO only on demand
2021-04-12 11:04:12 +02:00
iosabi
0c40158eac cpu/esp8266: Fix typo in esp_gdbstub config.
The extra `)` was a typo from the commit that changes the makefile
inline "if" to a multi-line "if" block.

Tested with `USEMODULE="esp_gdbstub" make BOARD=esp8266-esp-12x -C tests/lwip`
2021-04-10 22:49:23 +02:00
Marian Buschsieweke
ac774f3404
Merge pull request #16212 from nandojve/xmega_pm
cpu/atxmega: Add periph power management
2021-04-07 11:45:24 +02:00
Francisco
700046238f
Merge pull request #16261 from maribu/cpu/stm32/periph_eth
cpu/stm32/periph_eth: fix format specifier in DEBUG()
2021-04-07 09:32:09 +02:00
369868e7a2
cpu/lpc23xx: remove unused flashrom code 2021-04-05 17:07:29 +02:00
Gerson Fernando Budke
93ed3cd9d6 cpu/atxmega: Add periph power management
The current xmega don't have a way to disable peripherals that are
not in used.  Add peripheral management to allow enable only the mcu
blocks that will be used by application.  This saves power on active
and sleep modes.  By default, at clock initialization, all peripherals
are now disabled and each drive must activate at initialization phase.
The periph_timer and periph_uart were updated with this new feature.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-04-02 14:24:31 -03:00
Francisco
e04dd4dcce
Merge pull request #16272 from jue89/fix/stm32_gpio_irq
cpu/stm32/gpio: fix IRQ handler
2021-04-02 13:07:39 +02:00
Francisco
9d1d2f9e21
Merge pull request #16172 from kfessel/p-zimer-sec
sys/ztimer: add ZTIMER_SEC, improve auto_init
2021-04-02 08:32:38 +02:00
Jue
43f83a520b cpu/stm32/gpio: fix IRQ handler 2021-04-01 19:31:27 +01:00
Karl Fessel
15f2d0008a native/rtc: ensure no struct tm extra information is used 2021-04-01 18:19:15 +02:00
Karl Fessel
72213ec99a native/rtc: avoid dealing with DST 2021-04-01 18:19:15 +02:00
dylad
99764b82ab cpu/sam0: correct periph_cpu_common.h documentation 2021-03-31 22:17:01 +02:00
Marian Buschsieweke
164aa72250
cpu/stm32/periph_eth: fix format specifier in DEBUG()
Use PRIu32 instead of lu to make LLVM happy.
2021-03-31 10:11:46 +02:00
chrysn
fa9a297e7c
Merge pull request #16250 from chrysn-pull-requests/nrf52-more-timers
cpu/nrf52: Expose more timers
2021-03-30 20:28:27 +02:00
Marian Buschsieweke
ca8641c213
Merge pull request #16258 from maribu/cpu/sam3/periph_rtt
cpu/sam3/periph_rtt: fix rtt_get_alarm()
2021-03-30 17:47:30 +02:00
chrysn
2b09d3162a cpu/nrf52: Expose more timers 2021-03-30 16:34:44 +02:00
Marian Buschsieweke
8919b2c847
Merge pull request #16257 from fjmolinas/pr_arduino_due_config_freq
boards/arduino-due: allow changing frequency
2021-03-30 16:17:43 +02:00
Marian Buschsieweke
d816666d84
cpu/sam3/periph_rtt: fix rtt_get_alarm()
Previously, the return value was off by one.
2021-03-30 14:49:11 +02:00
Francisco Molina
89c0b2a827
cpu/sam3: add unified RTT configuration 2021-03-30 14:28:58 +02:00
Marian Buschsieweke
5e5f86fdc1
Merge pull request #16241 from nandojve/xmega_fix_clk_sel_after_dfll_en
cpu/atxmega/atxmega_cpu: Fix clk sel after dfll en
2021-03-30 13:16:23 +02:00
Francisco
2b7a6acecf
Merge pull request #16252 from maribu/avr-ldscipts
cpu/avr8_common: move ldscripts from atmega_common
2021-03-30 12:13:28 +02:00