Skip to content

PSRAM usage broken on most targets #879

Description

@robertlipe

ON this target, we have an ocean of PSRAM.

[W][ND] WS281x runtime show slow: channels=1 leds=2048 elapsed=61517 us
[W][ND] WS281x runtime show slow: channels=1 leds=2048 elapsed=61520 us
[I][ND] WiFi: WL_CONNECTED, MAC: 30:ed:a0:e2:97:65, IP: 192.168.2.32 Mem: 174780, LargestBlk: 129012, PSRAM Free: 28405040/33554432, LED FPS: 14 LED Bright: 100%, LED Watts: 47, Audio FPS: 14, MinVU: 0.6, PeakVU: 0.7, VURatio: 0.9 Buffer: 0/500, CPU: 001%, 098%, FreeDraw: 0.000
[W][ND] WS281x runtime show slow: channels=1 leds=2048 elapsed=61551 us
[W][ND] WS281x runtime show slow: channels=1 leds=2048 elapsed=61535 us

And we're merging it at startup:

load:0x4ff29ed0,len:0xccc
load:0x4ff2cbd0,len:0x3540
entry 0x4ff29ed0
[I][ND] PSRAM-default routing enabled at threshold 96 bytes
Replacing Idle Tasks with TaskManager...
E (1338) task_wdt: esp_task_wdt_reset(707): task not found

But the effective heap is misreported:

Heap Free
169.7 KB

Memory
Heap free 169.6 KB
Heap size 539.9 KB
DMA free 131.0 KB
DMA size 500.2 KB
PSRAM free 27.1 MB
PSRAM size 32.0 MB

Since we DID seemingly call heap_caps_malloc_extmem_enable()

the heap reported should include the PSRAM amount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions