Skip to content

Conversation

@wmrsouza
Copy link
Contributor

@wmrsouza wmrsouza commented Mar 11, 2025

This PR comes to update necesary details to use PSRAM with more recent Zephyr versions. It also updates the log results to be consistent with those observed when running the samples with more recent Zephyr versions.
This work also adds a session explaining how to place Zephyr's task stacks in external RAM and the associated risks.

in
## Placing Task Stack in PSRAM

Another way to to take advantage of PSRAM is by placing Zephyr's task stacks in the `.ext_ram.bss` section via `Z_KERNEL_STACK_DEFINE_IN()` with its trhird parameter `lsect` being `__attribute__((section(".ext_ram.bss")))`.
Copy link
Contributor

Choose a reason for hiding this comment

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

trhird -> third

$ west espressif monitor
```

Here is the log emmited by your board:
Copy link
Contributor

Choose a reason for hiding this comment

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

emmited -> emitted

@wmrsouza wmrsouza force-pushed the update/zephyr_how_to_use_psram branch from d83d5e3 to f5eafba Compare March 12, 2025 12:51
@wmrsouza wmrsouza requested a review from raffarost March 12, 2025 14:48
in
## Placing Task Stack in PSRAM

Another way to to take advantage of PSRAM is by placing Zephyr's task stacks in the `.ext_ram.bss` section via `Z_KERNEL_STACK_DEFINE_IN()` with its thrird parameter `lsect` being `__attribute__((section(".ext_ram.bss")))`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's still an extra "r":
thrird -> third


Another way to to take advantage of PSRAM is by placing Zephyr's task stacks in the `.ext_ram.bss` section via `Z_KERNEL_STACK_DEFINE_IN()` with its thrird parameter `lsect` being `__attribute__((section(".ext_ram.bss")))`.

>__Note:__ Be careful before deciding to put your task stacks in PSRAM: When flash cache is disabled (for example, if the flash is being written to), the external RAM also becomes inaccessible. Any read operations from or write operations to it will lead to an illegal cache access exception. You can find more restrictions regarding to the use of external RAM use [here](https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-guides/external-ram.html#restrictions)
Copy link
Contributor

@raffarost raffarost Mar 13, 2025

Choose a reason for hiding this comment

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

regarding the use (remove "to") and the last use (after), RAM (for redundancy):

"You can find more restrictions regarding the use of external RAM [here]"

This work comes to update necessary details to use PSRAM with more recent
Zephyr versions. It also updates the log results to be consistent with
those observed when running the samples with more recent Zephyr versions.
This work also adds a session explaining how to place Zephyr's task stacks
in external RAM and the associated risks.

Signed-off-by: Marcio Ribeiro <[email protected]>
@wmrsouza wmrsouza force-pushed the update/zephyr_how_to_use_psram branch from f5eafba to f8cb8d6 Compare March 13, 2025 12:10
@pedrominatel
Copy link
Member

Hi @wmrsouza, thanks for this update. Can we merge?

@wmrsouza
Copy link
Contributor Author

Hi @wmrsouza, thanks for this update. Can we merge?

Yes, we can

@pedrominatel pedrominatel added the GitLab-Sync-Merge Contribution reviewed and synced from the internal GitLab mirror label Mar 16, 2025
@pedrominatel pedrominatel merged commit d513a61 into espressif:main Mar 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitLab-Sync-Merge Contribution reviewed and synced from the internal GitLab mirror

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants