Skip to content

Hardware USB JTAG/Serial creates lags when used. #8284

Closed
@sblantipodi

Description

@sblantipodi

Board

Lolin ESP32-S3 mini

Device Description

Plain Lolin ESP32-S3 mini

Hardware Configuration

GPIO 16

Version

latest master (checkout manually)

IDE Name

CLION

Operating System

Windows 11

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

115200

Description

My firmware Luciferin is based on the NeoPixelBus library to control LEDs to act like an ambilight clone.

NeoPixelBus uses RMT to drive the LEDs.

When I set the board in TinyUSB mode I can drive the LEDs at 144 FPS without any flickering or lags.

When I set the board in USB JTAG/Serial I can see heavy flickering even at 60FPS.

The author of NeoPixelBus supposed that two things can cause this issue:

  • ISR priority and saturation, their hardware may still fire interrupts (data ready) and it is written that causes tons of interrupts; which have overhead to save registers, copy data, restore registers. Too many is a waist just for ISR overhead. Then their ISR maybe at a higher priority starving the RMT ISR>
  • ISR cycle consumption, their ISR takes way to long to do work, so when it releases and the RMT ISR triggers, it way past a PWM timing acceptance.
    TinyUSB maybe at the same priority as the RMT ISR.

Is there anything to fix in the RMT API that can cause this flickering?

Isn't USB JTAG/Serial an hardware method and as such supposed to work better than the software TinyUSB method?

Sketch

https://github.com/sblantipodi/glow_worm_luciferin

Debug Message

-

Other Steps to Reproduce

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions