Skip to content

Nrfx none revert s2ram procedures #2638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

adamkondraciuk
Copy link
Contributor

Restore pm s2ram procedures to C code form and use temporarily interrupt stack at the early stage.

@adamkondraciuk adamkondraciuk force-pushed the NRFX-NONE-revert-s2ram-procedures branch 2 times, most recently from 3c2ddfa to 2b3fd8c Compare March 20, 2025 13:45
@adamkondraciuk adamkondraciuk force-pushed the NRFX-NONE-revert-s2ram-procedures branch 2 times, most recently from d0331fe to 130ac46 Compare March 21, 2025 09:35
@adamkondraciuk adamkondraciuk requested a review from nordicjm March 21, 2025 12:01
@adamkondraciuk adamkondraciuk force-pushed the NRFX-NONE-revert-s2ram-procedures branch from 130ac46 to ddf9e4e Compare March 24, 2025 12:46
wearyzen and others added 7 commits March 24, 2025 17:43
What is the change?
 - Fixes #83660 allowing device to now enter suspend mode even if
   CONFIG_DEBUG_THREAD_INFO is enabled.

Why is this needed?
 - z_sys_post_kernel was cleared as part of #d778d5c
   to "allow debuggers to display the correct thread state after
   the first 3 instructions have run".
   This is not required while resuming from suspend and
   it prevents the device from entering suspend so,
   move it out of resume path.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit 743fe63)
What is the change?
 - APIs `pm_s2ram_mark_set` and `pm_s2ram_mark_check_and_clear`,
   used to set/check pm_s2ram magic marker,
   no longer have Arm specific limitations.

Why is this needed?
 - These APIs are generic and should not have arch specific dependency.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit 7beff12)
Regular label are exported in the object file and cause gdb to consider
them as function start. Local labels on the other hand are not exported.
For example, using `disassemble z_arm_pendsv` after this change will
disassemble the whole function rather than stop at the first branch.

Signed-off-by: Wilfried Chauveau <[email protected]>
(cherry picked from commit 5261680)
…rk functions"

What is the change?
 - This reverts commit 474d4c3

Why do we need this change?
 - This commit was added because Cortex-M didn't have a valid
   stack to make required functionality work however,
   the previous commit fixes this and makes interrupt stack
   available for use. This removes Arm specific limitation from
   these generic APIs so revert the commit to reflect the same.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit b4fb5d3)
…ram marking function"

This reverts commit 7806677.

Signed-off-by: Adam Kondraciuk <[email protected]>
…ures"

The marking procedures can be reverted, since at this stage
it is already allowed to use the stack.
The MSP is temporairly set to interrupt stack in `reset.S` file before
calling s2ram procedures..

Upstream PR #: 87304

Signed-off-by: Adam Kondraciuk <[email protected]>

This reverts commit e68d110f7c175f2a9275659d023c9d37d1e4b4f1.
Optimize `pm_s2ram_mark_check_and_clear()` function.

Upstream PR #: 87304

Signed-off-by: Adam Kondraciuk <[email protected]>
@adamkondraciuk adamkondraciuk force-pushed the NRFX-NONE-revert-s2ram-procedures branch from ddf9e4e to 9724303 Compare March 24, 2025 16:44
@adamkondraciuk adamkondraciuk added this to the ncs-3.0.0 milestone Apr 1, 2025
@nordicjm nordicjm merged commit 679b386 into nrfconnect:main Apr 2, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants