Seeed-Solution / SenseCAP_Indicator_ESP32

SenseCAP Indicator SDK.
https://wiki.seeedstudio.com/SenseCAP_Indicator_How_To_Flash_The_Default_Firmware/#ESP-IDF
Apache License 2.0
39 stars 30 forks source link

Can Indicator RP2040 pull the image from Vision V2 faster? #49

Closed Love4yzp closed 9 months ago

Love4yzp commented 9 months ago

There are two problems:

Love4yzp commented 9 months ago

When Using RP2040, it must using the hardware UART instead of software entity. Doing so, you'll need to modify the pins_arduino.h, which you can edit locally. according to the datasheet of pico, I modified as follow:

#pragma once

// Serial
#define PIN_SERIAL1_TX (16u)
#define PIN_SERIAL1_RX (17u)

//#define PIN_SERIAL2_TX (8u)
//#define PIN_SERIAL2_RX (9u)
#define PIN_SERIAL2_TX (20u)
#define PIN_SERIAL2_RX (21u)

// SPI
#define PIN_SPI0_MISO  (0u)
#define PIN_SPI0_MOSI  (3u)
#define PIN_SPI0_SCK   (2u)
#define PIN_SPI0_SS    (1u)

#define PIN_SPI1_MISO  (12u)
#define PIN_SPI1_MOSI  (11u)
#define PIN_SPI1_SCK   (10u)
#define PIN_SPI1_SS    (13u)

// Wire
#define PIN_WIRE0_SDA  (20u)
#define PIN_WIRE0_SCL  (21u)

#define PIN_WIRE1_SDA  (26u)
#define PIN_WIRE1_SCL  (27u)

#define SERIAL_HOWMANY (3u)
#define SPI_HOWMANY    (2u)
#define WIRE_HOWMANY   (2u)

#include "../generic/common.h"

Be attention of the WIRE0, as it connot be comment and I didn't change it. so if you want to use I2C, use WIRE1 instead.

wire.begin() // do not use it
wire1.begin() // yes

So, For Indicator, RP2040 connect to PC via USB2.0, Serial1 to inner ESP32 and Serial2 via grove(20,21). Serial2 will support the high speed baud, as now it's harware configured.