gin66 / FastAccelStepper

A high speed stepper library for Atmega 168/328p (nano), Atmega32u4, Atmega 2560, ESP32, ESP32S2, ESP32S3, ESP32C3 and Atmel SAM Due
MIT License
286 stars 67 forks source link

ESP32-S3 Series #100

Closed gin66 closed 1 year ago

gin66 commented 2 years ago

This device contains mcpwm module, but only 4 instead of 8 pulse counters. Thus 4 steppers should be possible to be supported.

Anyone available for test, so an update of the driver makes sense ?

doudar commented 2 years ago

Sure, I'm available to test if you like.

Just tried a quick compile for S3 from master on an existing large project (SmartSpin2k). Relevant platformio.ini:

platform = https://github.com/tasmota/platform-espressif32/archive/refs/heads/IDF44/ESP32-S3.zip board = esp32-s3-devkitc-1 framework = arduino

errors (Probably because you haven't implemented anything yet):

`.pio/libdeps/release/FastAccelStepper/src/common.h:150:2: error: #error "Unsupported derivate"

error "Unsupported derivate"

^~~~~ In file included from .pio/libdeps/release/FastAccelStepper/src/common.h:162, from .pio/libdeps/release/FastAccelStepper/src/FastAccelStepper.h:5,`

`.pio/libdeps/release/FastAccelStepper/src/common.h:168:21: error: 'QUEUES_MCPWM_PCNT' was not declared in this scope

define NUM_QUEUES (QUEUES_MCPWM_PCNT + QUEUES_RMT)`

`.pio/libdeps/release/FastAccelStepper/src/common.h:168:41: error: 'QUEUES_RMT' was not declared in this scope

define NUM_QUEUES (QUEUES_MCPWM_PCNT + QUEUES_RMT)`

gin66 commented 2 years ago

Thanks for your willingness to test on esp32-s3. Please be patient, because these days I am quite busy. Hope to start on the adaptation within the next two weeks.

The driver already supports rmt in addition to mcpwm+pcnt. This means, two possible paths to follow. During the adaptation will see, which path generates the least effort.

martinmay67 commented 1 year ago

Hi guys, any progress on this? At least idea about which direction to go?

martinmay67 commented 1 year ago

Okay, I dis some changes and have a version that works with ESP32S3. Should I create PR?

gin66 commented 1 year ago

sure. Looking forward to this

HeldeReis commented 1 year ago

Okay, I dis some changes and have a version that works with ESP32S3. Should I create PR?

Hello Martin,

Can you share your modifications? I will be migrating a project soon to the esp32-s3 and it would be of great help.

HeldeReis commented 1 year ago

Hello gin66,

I made some changes to allow support to ESP32 S3 and made a pullrequest (ESP32 S3 MCPWM/PCNT Support #162). It is the first time that i make something on gihub so i hope not to have missed something. I am available if you need some specific tests to be done.

gin66 commented 1 year ago

Thanks for the patch. I have merged in and the github action to build the sw has worked. So I release it with 0.28.4