The motor starts very slowly, almost immediately chatters forward and backward for maybe a couple hundred ms, then accelerates to a moderate speed, then stops entirely for maybe a hundred ms, then restarts at the previous speed and decelerates at the same rate as the acceleration. āOK, thatās just because itās going for only 1000 steps,ā I thought, so I increased the move from 1000 to 9999 and tried again. The motor just ramped to the same speed as before, then sat there still for a longer period (I didnāt time it, but Iām quite sure it was the time needed to get up to 4999 and then back down), and then restarted and decelerated as before. Like I said, very odd.
I tried specifying the use of the DRIVER_RMT, stepperMain = engine.stepperConnectToPin(stepPinStepper, DRIVER_RMT); but that fails during compilation with a āāDRIVER_RMTā was not declared in this scopeā error.
Wheels are spinning in sand, but my motor isnāt spinning as intended.
So Iām seeing the RMT isnāt fully supported on the C6 it has different timing, Again S3 is your man on this ⦠LEDc is all that supported now , with PWM on the C6 .try switching BSPās but I 'm skeptical . the first one may be the only one that works , something about a Macro compatibility
The AI has it this way, Unfortunatelyā¦
The userās example sketch compiles and runs, and the stepper does move⦠but with weird behavior:
Starts slowly
Chatters
Pauses mid-move
Ramps again
This matches known issues when FastAccelStepper is not correctly configured for:
The C6ās timing architecture
Driver backend not being set explicitly
Missing RMT support
Root Problems
1. ESP32-C6 is not fully supported by FastAccelStepper
As of now, the FastAccelStepper library doesnāt have official support for ESP32-C6.
The library has backends like DRIVER_RMT and DRIVER_TMC2209_UART, but DRIVER_RMT depends on ESP32ās RMT peripheral ā not yet ported or tested on the C6 in this library.
It fails because on ESP32-C6, the fas_arch layer doesnāt defineDRIVER_RMT, nor does it map to the correct timing system (ledc, mcpwm, or rmt).
3. The default fallback step timing engine may glitch
When no specific driver is selected, the engine might default to a bit-banged or partially timed loop, which behaves erratically under load or without tight control of FreeRTOS tasks.
Recommendations
Quick Fix: Try Slower, Simpler Step Timing
Until the C6 is fully supported by FastAccelStepper, consider:
Lower setSpeedInHz() to 100ā200 Hz
Use a delay() between moves
Try stepper->runForward(); for continuous movement and test stability
Use LEDC Instead of RMT
The ESP32C6 has LEDC PWM but limited RMT channels, and RMT driver usage differs from ESP32/S3. Consider:
Switching to LEDC-based PWM using a manual stepper library like AccelStepper (with LEDC under the hood)
Migrate to the ESP32-S3
If he needs:
RMT support
Known working FastAccelStepper
Full peripheral support
Then the ESP32-S3 is a better choice. The FastAccelStepper community has confirmed working setups on ESP32 and S3, not C6 (yet).
No joke! Seeed claims the S3 shipped today⦠and to my shock USPS says they have it! Weāll see! I have thumb surgery at the beginning of July and my left thumb will be 100% out of commission for 10 weeks, followed by months of PT. Getting this project done beforehand isnāt critical, but it sure would be nice!
Yea , so I should clarify⦠buzers etc. sure⦠the C6 supports the RMT peripheral (itās just slightly different from S3/ESP32 classic). If configured correctly in the SDK or ESP-IDF layer, itās usable for waveform generation (buzzers, IR, step pulses, etc).
also further clarification.
The FastAccelStepper library currently has limited or no full support for the ESP32-C6 Arduino platform out of the box.
The DRIVER_RMT not being defined is a sign the library wasnāt compiled with proper C6 support macros or files.
If the C6 is not explicitly supported in fas_arch, youāll run into missing defines or incompatible peripheral mappings.
But out of the box, without adjustments or a solid understanding of C6 architecture, the S3 is a more straightforward choice because:
Itās better supported by libraries like FastAccelStepper.
Dual-core design avoids many Arduino-loop blocking issues.
More robust peripheral support (e.g., LEDC, MCPWM, RMT).
You can create a FreeRTOS task to handle stepping*:
Absolutely ā moving stepper timing logic into a FreeRTOS task (with xTaskCreatePinnedToCore()) avoids interference from the loop() task or BLE/WiFi handlers.
The issue isnāt with the hardware, but rather how the Arduino layer handles loop execution and task scheduling. LOL, it doesnāt
anyway, may try the first BSP tooā¦the C6 isnāt getting the full effort from espressif IMO.
I had another look at this and found that the AccelStepper and FastAccelStepper both work fine with the XIAO ESP32-C6.
I tried both 2 and 4 wire steppers as well⦠I donāt have a DRV8825 to test on my motors (I use my own drivers) but I donāt see why they should be different?
I didnāt see the 2 second āglitchā and the code that it is caused by doesnāt end up in the compiled project?
I donāt see where thatās mentioned. I do see the C6 is supported however?
I dont understand how you can make such a blanket statement⦠The Board Support Package and the MCU do many untold configuration changes and setup options that only an AI could unwind⦠even the timing software or a simple multiplication or division equation can cause a delay⦠if-then statement⦠its all over⦠IMO
While the ESP32C6 is listed as being supported, in my (albeit very limited) experience it doesnāt (fully) work and is also listed as untested. I canāt prove a negative, but the S3 I have on order is scheduled to arrive on Tuesday and Iāll test it and see what happens. Iāll report back. Obviously if there are still problems then I think we can conclude the issues lie elsewhere, not unlikely between my ears.
I think what we have here is a weird combo here.
Both could be true, If OP could post his compiler output the first 3 lines and the last 10 or so before the upload. We could check this further and more thorough. First is the BSP. it always is. WHY ? itās provided by the manufacture (it there hardware). @grobasoz is correct about the arduino core and itās support also plays the second major part to even build anything with it.
I donāt mean to infer that the issue doesnāt exist in itās present code, or that it canāt be coded around. iām saying OUT of the box Iām not convinced so much!
All one needs to do is look at the number of BSPās for espressif in the boards TAB, LOL They donāt really want to support Arduino_IDE thatās why there core support is WEAK and getting weaker. One does not need to look further than NimBLE for example⦠What a disaster, but works perfect if you use the ESP_IDF ā¦??
Itās a great area of discussion because each manufacture support is different. we all want all of it NOW
is it the Silicon? " the C6 " I would say it does make a difference at a minimum in performance itās Apples and Oranges. IMO
Also is the C6 really Dual-core? some say YES, because of the LP-coprocessor. vs. the S3ās true Dual Extensa cores
" a high-performance (HP) processor with running up to 160 MHz , and a low-power (LP) 32-bit RISC-V processor, which can be clocked up to 20 MHz."
vs.
Xtensa LX7 dual-core, 32-bit processor running up to 240 MHz
In the TouchRing_BLE demo I posted you can use either MCU for the build ,with the S3 Very, Very Obvious in the response of the display and TouchScreen and BLE Faster to advertise and scan & connect is insanely fast. the C6 is notably slower in all of the above.
Just the Standalone TouchRing code (no radios, no BLE involved)
is easy to see even with extra ram the C6 is lower performance, just saying. (captain obvious here)
other than the onboard antenna, IMO the juice is NOT worth the Squeeze. So why is it the best for Zigbee, thread , and the others⦠Because why ? Espresso knows why? we can only speculate. What about all that stuff for the S3 too?
Good stuff, for sure.
these are just some personal views of it, Iām certainly no expert. So thereās that
Best of luck with your project! I used an Arduino Nano Matter for a project that needed Thread capability and it was great. (That said, it didnāt have any critical timing requirements.) But for this project, I need something smaller.
Hi all,
So as not to bury the lede, the S3 arrived today and works marvelously. With or without interrupts disabled, bit-banged, using AccelStepper, or using FastAccelStepper, everything is as close to flawless as I could hope. I never even pinned the task to one of the cores. It just worked. (Thereās more testing to be done, but for now Iām happy to stick with the S3 for this project.)
But in response to the request for the output of the compiler, here it is in all its glory. S3 first, then C6.
ESP32S3 Compiler Output
Sketch uses 318882 bytes (9%) of program storage space. Maximum is 3342336 bytes.
Global variables use 21488 bytes (6%) of dynamic memory, leaving 306192 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port /dev/cu.usbmodem1101
Connectingā¦
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: d8:3b:da:45:56:e4
Uploading stubā¦
Running stubā¦
Stub runningā¦
Changing baud rate to 921600
Changed.
Configuring flash sizeā¦
Flash will be erased from 0x00000000 to 0x00004fffā¦
Flash will be erased from 0x00008000 to 0x00008fffā¦
Flash will be erased from 0x0000e000 to 0x0000ffffā¦
Flash will be erased from 0x00010000 to 0x0005dfffā¦
Compressed 20208 bytes to 13058ā¦
Writing at 0x00000000⦠(100 %)
Wrote 20208 bytes (13058 compressed) at 0x00000000 in 0.3 seconds (effective 569.2 kbit/s)ā¦
Hash of data verified.
Compressed 3072 bytes to 146ā¦
Writing at 0x00008000⦠(100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 464.0 kbit/s)ā¦
Hash of data verified.
Compressed 8192 bytes to 47ā¦
Writing at 0x0000e000⦠(100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 728.5 kbit/s)ā¦
Hash of data verified.
Compressed 319024 bytes to 172413ā¦
Writing at 0x00010000⦠(9 %)
Writing at 0x0001bda5⦠(18 %)
Writing at 0x00028a20⦠(27 %)
Writing at 0x0002e143⦠(36 %)
Writing at 0x00033a4d⦠(45 %)
Writing at 0x00039420⦠(54 %)
Writing at 0x0003ea37⦠(63 %)
Writing at 0x000443b2⦠(72 %)
Writing at 0x00049cfe⦠(81 %)
Writing at 0x00054a14⦠(90 %)
Writing at 0x0005ac10⦠(100 %)
Wrote 319024 bytes (172413 compressed) at 0x00010000 in 2.3 seconds (effective 1132.3 kbit/s)ā¦
Hash of data verified.
Leavingā¦
Hard resetting with RTC WDTā¦
-=-=-=-=-=-=-=-=-
ESP32C6 Compiler Output
Sketch uses 259465 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 14268 bytes (4%) of dynamic memory, leaving 313412 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port /dev/cu.usbmodem1101
Connectingā¦
Chip is ESP32-C6FH4 (QFN32) (revision v0.1)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: e4:b3:23:ff:fe:ae:b2:14
BASE MAC: e4:b3:23:ae:b2:14
MAC_EXT: ff:fe
Uploading stubā¦
Running stubā¦
Stub runningā¦
Changing baud rate to 921600
Changed.
Configuring flash sizeā¦
Flash will be erased from 0x00000000 to 0x00005fffā¦
Flash will be erased from 0x00008000 to 0x00008fffā¦
Flash will be erased from 0x0000e000 to 0x0000ffffā¦
Flash will be erased from 0x00010000 to 0x0004ffffā¦
Compressed 20624 bytes to 13135ā¦
Writing at 0x00000000⦠(100 %)
Wrote 20624 bytes (13135 compressed) at 0x00000000 in 0.3 seconds (effective 486.7 kbit/s)ā¦
Hash of data verified.
Compressed 3072 bytes to 146ā¦
Writing at 0x00008000⦠(100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 439.0 kbit/s)ā¦
Hash of data verified.
Compressed 8192 bytes to 47ā¦
Writing at 0x0000e000⦠(100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 642.6 kbit/s)ā¦
Hash of data verified.
Compressed 259568 bytes to 146967ā¦
Writing at 0x00010000⦠(11 %)
Writing at 0x0001bda0⦠(22 %)
Writing at 0x000231a5⦠(33 %)
Writing at 0x00029bdc⦠(44 %)
Writing at 0x000304c9⦠(55 %)
Writing at 0x000368bc⦠(66 %)
Writing at 0x0003c937⦠(77 %)
Writing at 0x00042a4d⦠(88 %)
Writing at 0x00048aac⦠(100 %)
Wrote 259568 bytes (146967 compressed) at 0x00010000 in 1.9 seconds (effective 1081.0 kbit/s)ā¦
Hash of data verified.
Leavingā¦
Hard resetting via RTS pinā¦
-=-=-=-=-=-=-=-
At any rate, Iām happy. Thank you all for your help. grobasoz, best of luck with your project! I hope you get it all working.
Ahā As I say the S3 never disappoints⦠Glad itās working good too.
and just an FYI , Turn on the verbose output in the setting for the compiler and youāll get some additional info to aid in troubleshooting.
i.e. the first 3 lines BSP thatās used to compile .
ESP32S3:
FQBN: esp32:esp32:XIAO_ESP32S3
Using board āXIAO_ESP32S3ā from platform in folder: /Users/john_s/Library/Arduino15/packages/esp32/hardware/esp32/3.2.0
Using core āesp32ā from platform in folder: /Users/john_s/Library/Arduino15/packages/esp32/hardware/esp32/3.2.0
ESP32C6:
FQBN: esp32:esp32:XIAO_ESP32C6
Using board āXIAO_ESP32C6ā from platform in folder: /Users/john_s/Library/Arduino15/packages/esp32/hardware/esp32/3.2.0
Using core āesp32ā from platform in folder: /Users/john_s/Library/Arduino15/packages/esp32/hardware/esp32/3.2.0