Makuna / NeoPixelBus

An Arduino NeoPixel support library supporting a large variety of individually addressable LEDs. Please refer to the Wiki for more details. Please use the GitHub Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
1.17k stars 255 forks source link

False positive error report #800

Closed BlueAndi closed 2 months ago

BlueAndi commented 2 months ago

The "NeoEsp32RmtMethod" is used to update the strip. After a Show(), the CanShow() is called periodically to determine when the strip update is finished.

CanShow() calls IsReadyToUpdate() method: https://github.com/Makuna/NeoPixelBus/blob/e40289f89c1fc869ca68b1622efbb49866f8b01e/src/internal/methods/NeoEsp32RmtMethod.h#L598-L601

The rmt_wait_tx_done() is called with a timeout of 0, which causes an error report in case the transfer is not finished yet. See image

This pollute the log and causes that the system slows down.

Could we skip using the ESP_ERROR_CHECK_WITHOUT_ABORT() in especially this case?

One single error log looks like:

ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0x107 (ESP_ERR_TIMEOUT) at 0x4008862b
file: ".pio/libdeps/default/NeoPixelBus/src/internal/methods/NeoEsp32RmtMethod.h" line 599
func: bool NeoEsp32RmtMethodBase<T_SPEED, T_CHANNEL>::IsReadyToUpdate() const [with T_SPEED = NeoEsp32RmtSpeedWs2812x; T_CHANNEL = NeoEsp32RmtChannel6]
expression: rmt_wait_tx_done(_channel.RmtChannelNumber, 0)

NeoPixelBus: v2.7.9 Platform: espressif32 v6.5.0 Framework: arduino Board: esp32-S3 DevKitC-1

Makuna commented 2 months ago

The timeout shouldn't be an error, or they should provide a routine you can call to check/poll the state.

But your suggestion sounds like a good work around.

Makuna commented 2 months ago

https://github.com/Makuna/NeoPixelBus/tree/Esp32RmtSilentTimeout contains the changes to silence timeouts.

Give it try, if it works I will merge into master before the next release.

BlueAndi commented 2 months ago

Thanks, will try and come back with feedback.

BlueAndi commented 2 months ago

Successful tested, you can integrate the bugfix. Thanks for the fast and good support!!

Makuna commented 2 months ago

https://github.com/Makuna/NeoPixelBus/releases/tag/2.8.0