ESP8266 と LPC1114 の UART 最大通信速度

通常は 115200 bps 以下で通信しているが、音声データや画像データ(!)を送信可能か検討するため、実現できる最大通信速度について調査する。

 

まずはググった。

ESP8266 

ESP8266 は 20Mbps まで動くらしい。

ESP8266 max baud rate - Everything ESP8266

もちろん、基準となる動作クロックに依存するわけで、UARTのクロックが 80MHz の場合に I/Oピンの最大クロックが 20 Mbps らしい。

ESP8266 の SDK ドキュメントの uart init の章に書いてあるらしい。

あった。

2c-esp8266_non_os_sdk_api_reference_en.pdf

-----------------------------------------------------------------------------------------------------

8.2. UART Related APIs

By default, UART0 is a debug output interface. In the case of a dual UART, UART0 works as data receive and transmit interface, while UART1 acts as the debug output interface. Please make sure all hardware is correctly connected.

8.2.1. uart_init

Function:
Initialize baud rates of the two UARTs

Prototype: void uart_init(

UartBautRate uart0_br,

UartBautRate uart1_br )

Parameters:
UartBautRate uart0_br : uart0 baud rate UartBautRate uart1_br : uart1 baud rate

Baud Rates: typedef enum {

BIT_RATE_9600 = 9600, BIT_RATE_19200 = 19200, BIT_RATE_38400 = 38400, BIT_RATE_57600 = 57600, BIT_RATE_74880 = 74880, BIT_RATE_115200 = 115200, BIT_RATE_230400 = 230400, BIT_RATE_460800 = 460800, BIT_RATE_921600 = 921600

} UartBautRate;

Return: none

------------------------------------------------------------------------------------------------

 

用意されているライブラリのAPIでは 921600 が最高速度らしい。

ハードウェア的にはどうか?

テクニカルリファレンスにある。

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

11.3.1. The Baud Rate

The serial of ESP8266 can support the baud rate range from 300 to 115200 * 40.

 

ハードウェアフロー制御

安定した通信を行うには、ハードウェアフロー制御をしたほうが有利なはず。

ESP8266 と LPC1114 はハードウェアフロー制御に対応しているか?

ESP8266 technical reference によると

---------------------------------------------------------------------------------------

11.1. Functional Overview

11. UART Introduction

 

Espressif

78/ 104 2016.08

There are two group ESP8266 UART interfaces, respectively:

  • UART0:

    • -  U0TXD: pin26 (U0TXD)

    • -  U0RXD: pin25 (U0RXD)

    • -  U0CTS: pin12 (MTCK)

    • -  U0RTS: pin13 (MTDO)

  • UART1:

- U1TXD: pin14 (GPIO2)

 ----------------------------------------------------------------------------------------

UART0 は RTS/CTS をサポートしている。また、

------------------------------------------------------------------------------------------

11.3.10.Flow Control

Espressif

Configuration process:

Configure pin12, pin13 of UART0 pin as U0CTS and U0RTS functions.

#define FUNC_U0RTS 4
#define FUNC_U0CTS 4 PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_U0RTS);

------------------------------------------------------------------------------------------

 

LPC1114

 ハードウェアフロー制御

ユーザマニュアルにかいてあった。対応していた。

-----------------------------------------------------------------------------------------------------

UM10398
9 章:LPC111x/LPC11Cx 汎用非同期送受信回路(UART)

9.3 特長

9.4 ピンの説明

  • 16 バイトの送受信 FIFO

  • レジスタの位置は’550業界標準に適合。

  • レシーバFIFOのトリガポイントは14814バイト。

  • 内蔵ボーレートジェネレータ。

  • UART は、ソフトウェアまたはハードウェアのフロー制御の実装を考慮。

  • 出力イネーブルでRS-485/EIA-4859ビットモードに対応。

  • モデム制御。

----------------------------------------------------------------------------------------------------