Hi, I am trying to get a project running on a Core2, I am getting errors related to the GPIO config.
I am using PIO in VSC, my PIO environment is setup as follows.
release (board: m5stack-core2; platform: espressif32; framework: arduino)
These are the GPIO config errors I am getting
Initialising Hardware
E (467) gpio: GPIO can only be used as input mode
[ 495][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (484) gpio: GPIO can only be used as input mode
[ 511][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (494) gpio: GPIO can only be used as input mode
[ 522][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (504) gpio: GPIO can only be used as input mode
[ 532][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (514) gpio: GPIO can only be used as input mode
[ 542][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (525) gpio: GPIO can only be used as input mode
[ 553][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (535) gpio: GPIO can only be used as input mode
[ 563][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (545) gpio: GPIO can only be used as input mode
[ 573][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (556) gpio: GPIO can only be used as input mode
[ 583][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
This is my pins.h configuration
I have used 100 for pins that are not currently used/required in the project.
/***********************************************************
* M5STACK CORE2
* UNTESTED
* NOTE M5STACK CORE2 has SD card on GPIOs 4/23/38/18
*
***/
#ifdef M5_STACK_CORE2
#define BOARD_TYPE "m5stack-core2"
// Define Physical Pins
// VAC CONTROL
#define VAC_SPEED_PIN 100 // Built in DAC1 - used for speed reference for VFD (0-3v)
#define VAC_BLEED_VALVE_PIN 100 // Built in DAC2 - used for bleed valve control
#define VAC_BANK_1_PIN 100 // vac motor(s) on/off
#define VAC_BANK_2_PIN 100 // Provision for 2 stage Vac motor control
#define VAC_BANK_3_PIN 100 // Provision for 3 stage Vac motor control
// SENSORS
#define SPEED_SENSOR_PIN 100 // turbine / rotor speed for turbo / blower flow bench
// SWIRL ENCODER
#define SWIRL_ENCODER_PIN_A 100
#define SWIRL_ENCODER_PIN_B 100
// ORIFICE DETECTION
#define ORIFICE_BCD_BIT1_PIN 100
#define ORIFICE_BCD_BIT2_PIN 100
#define ORIFICE_BCD_BIT3_PIN 100
//STEPPER MOTOR CONTROLLER
#define FLOW_VALVE_STEP_PIN 100
#define FLOW_VALVE_DIR_PIN 100
#define AVO_STEP_PIN 100
#define AVO_DIR_PIN 100
#define VCC_3V3_PIN 100 // Unused
#define VCC_5V_PIN 2 // 10k-10k divider across 5v supply
// NOTE: these inputs are handled by ADC
#define MAF_PIN 100 // NOTE: I2C ADC is used instead
#define REF_PRESSURE_PIN 100 // NOTE: I2C ADC is used instead
#define DIFF_PRESSURE_PIN 100 // NOTE: I2C ADC is used instead
#define PITOT_PIN 100 // NOTE: I2C ADC is used instead
// NOTE: These inputs are handled by BME280
#define TEMPERATURE_PIN 100 // NOTE: I2C BME280 used
#define REF_BARO_PIN 100 // NOTE: I2C BME280 used
#define HUMIDITY_PIN 100 // NOTE: I2C BME280 used
// COMMS
#define SERIAL0_TX_PIN 1 // API
#define SERIAL0_RX_PIN 3 // API
#define SERIAL2_TX_PIN 100 // GAUGE PROTOCOL CLOCK
#define SERIAL2_RX_PIN 100 // GAUGE PROTOCOL DATA
#define SDA_PIN 32 // BME280 etc
#define SCL_PIN 33 // BME280 etc
//#define SD_CS_PIN 4
//#define SD_MOSI_PIN 23
//#define SD_MISO_PIN 38
//#define SD_SCK_PIN 18
#endif
I hope someone here can help me resolve my problem.
Thanks.