Olimex ESP32 EVB_SD MMC_UART_I2C_Issue
Posted: Fri Aug 03, 2018 2:28 am
When we used SD_MMC arduino library, UART1 and I2C are not working.
UART1 Pins we use are: GPI36 for Rx and GPIO4 for Tx.
I2C Pins we use are: GPIO16 for SCL and GPIO13 for SDA.
UART1 Setup - Arduino Code:
---------------------------
#include <HardwareSerial.h>
static HardwareSerial UART1(1);
UART1.begin(BAUD_RATE, /* baud speed */
SERIAL_8N1, /* UART mode */
36, /* RX pin */
4 /* TX pin. */
);
SDMMC Setup - Arduino Code:
---------------------------
#include "FS.h"
#include "SD_MMC.h"
if(!SD_MMC.begin())
{
Serial.println("Card Mount Failed");
return;
}
I2C Setup - Arduino Code:
---------------------------
#include <Wire.h>
#include "RTClib.h"
/* I2C Pins & Frequency */
#define SCL 22 // Mapped SCL to GPIO21
#define SDA 21 // Mapped SDA to GPIO122
#define FREQ 100000
RTC_DS3231 RTC;
Wire.begin(SDA, SCL, FREQ); // SDA, SCL, Frequency
RTC.begin();
Please help us to resolve this issue.
UART1 Pins we use are: GPI36 for Rx and GPIO4 for Tx.
I2C Pins we use are: GPIO16 for SCL and GPIO13 for SDA.
UART1 Setup - Arduino Code:
---------------------------
#include <HardwareSerial.h>
static HardwareSerial UART1(1);
UART1.begin(BAUD_RATE, /* baud speed */
SERIAL_8N1, /* UART mode */
36, /* RX pin */
4 /* TX pin. */
);
SDMMC Setup - Arduino Code:
---------------------------
#include "FS.h"
#include "SD_MMC.h"
if(!SD_MMC.begin())
{
Serial.println("Card Mount Failed");
return;
}
I2C Setup - Arduino Code:
---------------------------
#include <Wire.h>
#include "RTClib.h"
/* I2C Pins & Frequency */
#define SCL 22 // Mapped SCL to GPIO21
#define SDA 21 // Mapped SDA to GPIO122
#define FREQ 100000
RTC_DS3231 RTC;
Wire.begin(SDA, SCL, FREQ); // SDA, SCL, Frequency
RTC.begin();
Please help us to resolve this issue.