Hi,
I’m using SimpleFOC V2.3.4, PlatformIO and ESP32S3 package version 3.0.4. I have two issues:
Issue 1: I’m getting an error in current_sense.init(). See below:
MOT: Monitor enabled!
MOT: Init
MOT: Enable driver.
[ 1117][E][esp32-hal-adc.c:172] __analogChannelConfig(): Pin is not configured as analog channel
[ 1126][E][esp32-hal-adc.c:172] __analogChannelConfig(): Pin is not configured as analog channel
MOT: Align sensor.
MOT: sensor_direction==CW
MOT: PP check: OK!
MOT: Zero elec. angle: 4.19
MOT: Align current sense.
CS: Switch A-B
CS: Inv B
MOT: Success: 4
MOT: Ready.
Looking into esp32_mcu.cpp, I noticed function _configureADCInline is setting pinMode(pin, ANALOG). Is there a mode called ANALOG? or, is it INPUT? Not sure if this is the cause of the error.
Issue 2: My ADC pins are A0 and A1. Not sure why align current sense is switching A,B and inv B. It works for Success 1. For Success 4, the BLDC motor only works in one-direction, but not both. What’s causing the inconsistencies?