Skip to content

Conversation

avtolstoy
Copy link
Member

Problem

While in safe mode Gen 4 devices only use 32KB of PSRAM for heap. This is not enough.

Solution

Set the minimum PSRAM heap size to 128KB and additionally while in safe mode expand the PSRAM heap to full PSRAM size.

This PR additionally fixes a couple of issues in DCT implementation which doesn't expect e.g. open() calls to fail which leads to RAM and/or flash corruption in case of unexpected issues like being low on heap.


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@avtolstoy avtolstoy added the bug label Apr 21, 2025
@avtolstoy avtolstoy added this to the 6.3.2 milestone Apr 21, 2025
Copy link
Member

@technobly technobly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@scott-brust scott-brust merged commit b723e86 into develop Apr 22, 2025
14 checks passed
@scott-brust scott-brust deleted the fix/gen4-psram-heap-safe-mode branch April 22, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants