1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu
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
..
arm7_common treewide: model newlib as a FEATURE 2021-01-27 09:24:25 +01:00
atmega32u4 cpu/atmega_common: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
atmega128rfa1 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega256rfr2 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega328p cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega1281 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega1284p cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega2560 cpu/atmega*: drop ldscripts_compat 2021-01-22 19:05:20 +01:00
atmega_common cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
atxmega cpu/atxmega/periph/i2c: Add i2c driver 2021-04-25 22:06:23 -03:00
avr8_common cpu/avr8_common: move ldscripts from atmega_common 2021-03-30 10:50:09 +02:00
cc26x0_cc13x0 cpu/cc26x0_cc13x0: use SetupTrimDevice only on cc26x0 2021-02-08 17:25:42 +01:00
cc26x2_cc13x2 cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
cc26xx_cc13xx cpu/cc26xx_cc13xx: add CPU documentation 2021-02-18 11:28:06 +01:00
cc2538 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
cortexm_common cortexm: initialise fpu early 2021-04-29 13:19:47 +02:00
efm32 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
esp32 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
esp8266 esp8266: Support UART1 and other UART0 pins. 2021-05-02 12:27:27 +00:00
esp_common esp8266: Support UART1 and other UART0 pins. 2021-05-02 12:27:27 +00:00
fe310 cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
kinetis cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
lm4f120 drivers/periph/timer: Use uint32_t for frequency 2020-10-30 22:02:12 +01:00
lpc23xx cpu/lpc23xx: implement periph/flashpage 2021-04-29 13:05:42 +02:00
lpc1768 cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
mips32r2_common cpu: mips32r2_common: set BITARITHM_HAS_CLZ 2021-02-02 11:14:38 +01:00
mips_pic32_common pic32_common: Add CPU specific xfa.ld variant 2021-02-16 14:55:26 +01:00
mips_pic32mx cpu/mips: remove never used load memory address 2020-10-13 18:57:39 +02:00
mips_pic32mz cpu/mips: remove never used load memory address 2020-10-13 18:57:39 +02:00
msp430_common cpu/msp430_common/kconfig: add dbgpin feature 2021-02-26 11:34:52 +01:00
msp430fxyz cpu/msp430: move default module to Makefile.default 2021-01-25 09:17:00 +01:00
native native/rtc: ensure no struct tm extra information is used 2021-04-01 18:19:15 +02:00
nrf5x_common cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
nrf51 cpu/nrf51: define GPIO_COUNT 2021-02-14 00:29:47 +01:00
nrf52 cpu/nrf52/nrf802154: use driver specific legacy pseudomodule 2021-03-10 14:18:12 +01:00
qn908x Merge pull request #15689 from iosabi/qn908x_spi 2021-01-31 18:35:13 +01:00
riscv_common cpu/fe310: add XFA support 2021-02-18 10:46:08 +01:00
sam0_common cpu: add periph_rtt_overflow feature 2021-04-30 11:58:00 +02:00
sam3 Merge pull request #16258 from maribu/cpu/sam3/periph_rtt 2021-03-30 17:47:30 +02:00
sam_common cpu/sam_common: set CPU_HAS_BITBAND 2020-08-08 12:44:11 +02:00
samd5x Merge pull request #15845 from benpicco/boards/adafruit-itsybitsy-m4 2021-02-09 19:41:43 +01:00
samd21 cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
saml1x cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
saml21 cpu: make pm_layered a DEFAULT_MODULE 2021-01-27 13:21:20 +01:00
stellaris_common cpu: do not locally export compilation variables 2019-08-29 10:35:53 +02:00
stm32 Merge pull request #16418 from fjmolinas/pr_stm32_spi_param_order 2021-04-30 14:37:17 +02:00
doc.txt cpu/lpc23xx: rename Doxygen group 2020-07-16 17:01:10 +02:00
Kconfig treewide: change Kconfig prefix for module symbols 2020-08-31 09:57:28 +02:00