Skip to content

Conversation

@tt33415366
Copy link

Enable RMT-based stepping engine for ESP32-S3 with simplified implementation and performance optimizations for smoother stepper motion.

Key changes:

  • Relocate rmt_engine.c to shared esp32/ directory for multi-platform support
  • Enable RMT for ESP32-S3 (MAX_N_RMT = 4)
  • Simplified RMT approach: pre-filled SRAM items + direct register trigger
  • Use 4MHz RMT clock (clk_div=20) for 0.25us timing precision
  • Increase mem_block_num to 3 (192 items) to reduce FIFO reload interrupts
  • Increase ACCELERATION_TICKS_PER_SECOND from 100 to 200

Performance improvements:

  • Step pulse jitter reduced by ~87% (max glitch: 1535Hz → 203Hz)
  • RMS error reduced by 21%
  • Quantization error reduced from ±0.5us to ±0.125us

Tested on ESP32-S3 4-axis CNC at 4000Hz step rate.

Enable RMT-based stepping engine for ESP32-S3 with simplified
implementation and performance optimizations for smoother stepper motion.

Key changes:
- Relocate rmt_engine.c to shared esp32/ directory for multi-platform support
- Enable RMT for ESP32-S3 (MAX_N_RMT = 4)
- Simplified RMT approach: pre-filled SRAM items + direct register trigger
- Use 4MHz RMT clock (clk_div=20) for 0.25us timing precision
- Increase mem_block_num to 3 (192 items) to reduce FIFO reload interrupts
- Increase ACCELERATION_TICKS_PER_SECOND from 100 to 200

Performance improvements:
- Step pulse jitter reduced by ~87% (max glitch: 1535Hz → 203Hz)
- RMS error reduced by 21%
- Quantization error reduced from ±0.5us to ±0.125us

Tested on ESP32-S3 4-axis CNC at 4000Hz step rate.

Signed-off-by: Lea <lea.li@reallink-tech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant