uart: bringup on esp32c3

This commit is contained in:
Armando
2020-11-26 14:13:49 +08:00
committed by Angus Gratton
parent 076be2b480
commit d393699ab6
4 changed files with 84 additions and 23 deletions

View File

@@ -196,6 +196,8 @@
#define APB_CLK_FREQ ( 80*1000000 )
#endif
#define REF_CLK_FREQ ( 1000000 )
#define RTC_CLK_FREQ (20*1000000)
#define XTAL_CLK_FREQ (40*1000000)
#define UART_CLK_FREQ APB_CLK_FREQ
#define WDT_CLK_FREQ APB_CLK_FREQ
#define TIMER_CLK_FREQ (80000000>>4) //80MHz divided by 16

View File

@@ -40,6 +40,7 @@
#include "rmt_caps.h"
#include "sha_caps.h"
#include "spi_caps.h"
#include "uart_caps.h"
/*-------------------------- TOUCH SENSOR CAPS -------------------------------*/
#define SOC_TOUCH_SENSOR_NUM (0) /*! No touch sensors on ESP32-C3 */

View File

@@ -21,9 +21,11 @@ extern "C" {
#define SOC_UART_FIFO_LEN (128) /*!< The UART hardware FIFO length */
#define SOC_UART_BITRATE_MAX (5000000) /*!< Max bit rate supported by UART */
#define SOC_UART_SUPPORT_RTC_CLK (1)
#define SOC_UART_SUPPORT_XTAL_CLK (1)
// ESP32-C3 have 2 UART
#define SOC_UART_NUM (2)
#define SOC_UART_MIN_WAKEUP_THRESH (2)
#ifdef __cplusplus
}