1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-15 21:52:46 +01:00
RIOT/boards/common
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
..
arduino-atmega boards/common/arduino-atmega: define led_init as weak 2020-08-19 09:17:50 +02:00
arduino-due boards/arduino-due: allow changing frequency 2021-03-30 14:22:50 +02:00
arduino-mkr boards/samd21-arduino-bootloader: rename to samdx1-arduino-bootloader 2021-02-09 19:44:03 +01:00
arduino-zero boards/common/arduino-zero: configure RTT_MIN_OFFSET 2021-01-19 12:37:39 +01:00
atmega cpu/avr8_common: Move irq_enable from board to cpu 2021-03-15 20:16:10 -03:00
atxmega boards/common: Introduce Atmel xmega common 2021-03-15 20:16:10 -03:00
blxxxpill boards/blxxxpill: remove dfu-util conditionals 2021-02-23 21:22:54 +01:00
cc26xx_cc13xx boards/cc26x2_cc13x2: set supported programmers 2021-02-24 13:29:39 +01:00
cc2538 boards/cc2538: set cc2538-bsl as supported programmer 2021-02-24 13:28:53 +01:00
e104-bt50xxa-tb make: namespace openocd DEBUG_ADAPTER variable 2021-02-23 21:22:52 +01:00
esp32 boards: remove include of serial.inc.mk 2020-12-02 09:20:57 +01:00
esp8266 esp8266: Support UART1 and other UART0 pins. 2021-05-02 12:27:27 +00:00
frdm boards/frdm: set openocd as only supported programmer 2021-02-24 13:29:16 +01:00
iotlab boards/iotlab: only openocd programmer is supported 2021-02-24 13:28:01 +01:00
kw41z make: namespace openocd DEBUG_ADAPTER variable 2021-02-23 21:22:52 +01:00
makefiles common/samd21-arduino-bootloader: use common stdio CDC ACM config 2020-10-20 10:52:50 +02:00
microbit b/c/microbit: Use timer 2 on microbit-v2 2021-03-30 16:34:44 +02:00
msb-430 boards/msp430: setup supported programmers 2021-02-24 13:29:56 +01:00
msba2 boards: set supported programmers 2021-02-24 13:30:34 +01:00
nrf51 boards/nrf51: setup supported programmers 2021-02-24 13:29:17 +01:00
nrf52 cpu/nrf52: Expose more timers 2021-03-30 16:34:44 +02:00
nrf52xxxdk boards/nrf-based: select VDD_LC_FILTER feature(s) 2021-02-19 17:19:45 +01:00
nucleo boards/nucleo: fix xtimer configuration 2020-09-08 11:19:59 +02:00
nucleo32 boards/nucleo-*: put Kconfig HSE/LSE clock config in common 2021-01-20 09:16:46 +01:00
nucleo64 boards/nucleo-*: put Kconfig HSE/LSE clock config in common 2021-01-20 09:16:46 +01:00
nucleo144 boards/nucleo-*: put Kconfig HSE/LSE clock config in common 2021-01-20 09:16:46 +01:00
particle-mesh boards/nrf52: setup supported programmers 2021-02-24 13:29:38 +01:00
qn908x boards: set supported programmers 2021-02-24 13:30:34 +01:00
remote boards: add riotboot to cc2538 based boards 2020-11-13 14:51:58 +01:00
samdx1-arduino-bootloader boards/samd21-bootloader: add bossa as supporter programmer 2021-02-24 13:27:04 +01:00
saml1x Merge pull request #14478 from benpicco/cpu/sam0/tc_pwm 2020-09-10 23:04:58 +02:00
silabs boards/silabs: define supported programmers 2021-02-24 13:29:16 +01:00
slwstk6000b boards/*efm32*: do not force RTT_FREQUENCY 2021-04-20 11:12:45 +02:00
sodaq boards/samd21-arduino-bootloader: rename to samdx1-arduino-bootloader 2021-02-09 19:44:03 +01:00
stm32 boards: add nucleo-wl55jc 2021-04-20 21:04:29 +02:00
weact-f4x1cx boards/stm32f4*: add Kconfig clock configuration 2021-01-19 22:09:16 +01:00
doc.txt boards/stm32f103c8: add docu on flashing with DFU 2018-08-15 15:00:13 +02:00