Skip to content

ESP8266 DMA method (pin 3) apparently uses all memory #4906

@willmmiles

Description

@willmmiles

What happened?

When using pin 3 for digital output on ESP8266, if the length is exactly right such that the buffer size needed for the 3-bit I2S cadence works out to a multiple of 4 bytes, then the system appears to run out of memory.

This seems to be caused by an off-by-one error in the DMA buffer translation introduced in NeoPixelBus v2.8.1.

The overrun typically squashes the "block size" of the next block of heap -- often the majority of the free RAM -- so the system reports no available memory and is unable to respond on the web interface.

To Reproduce Bug

On an ESP8266, set a WS2812 strip of length 300 on pin 3.

Expected Behavior

LED output should proceed and the system should respond on the web interface

Install Method

Self-Compiled

What version of WLED?

0.15.1, 0.16

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

Anything else?

Reference discussion in #4614.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugexternalNot part of WLED itself - an external plugin/remote etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions