Skip to content
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

[nrf noup] soc: nrf54l: Disable CRACEN RAMs on system off #1983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Aug 29, 2024

Configure the CRACEN internal RAMs to avoid being retained during system off. Exiting system off triggers a system level reset so there is no need for the CRACEN RAMs to be retained during that.

Noup since the upstream code is not TFM aware yet and the edited function does not exist upstream.

Comment on lines +177 to +187
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 1, (1 << 2), false);
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 1, (1 << 3), false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could those (1 << X) be defines to explain what they are?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could MEMCONF_POWER_RET_MEM2_Msk, MEMCONF_POWER_RET_MEM3_Msk and MEMCONF_POWER_CONTROL_MEM2_Msk and MEMCONF_POWER_CONTROL_MEM3_Msk be utilized for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't mix MDK defines with HAL functions, if you think those masks are needed we can add them to HAL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I will not mix these up indeed. But I will write some more description on the bits that I am setting now that I got a confirmation from the spec writers that it is ok to do so.

Comment on lines +177 to +187
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 1, (1 << 2), false);
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 1, (1 << 3), false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could MEMCONF_POWER_RET_MEM2_Msk, MEMCONF_POWER_RET_MEM3_Msk and MEMCONF_POWER_CONTROL_MEM2_Msk and MEMCONF_POWER_CONTROL_MEM3_Msk be utilized for this?

Configure the CRACEN internal RAMs to avoid being retained
during system off. Exiting system off triggers a system level
reset so there is no need for the CRACEN RAMs to be retained
during that.

Also don't retain the CRACEN RAMs in system on idle if CRACEN
is not used at all.

Noup since the upstream code is not TFM aware yet and the
edited function does not exist upstream.

Ref: NCSDK-27427

Signed-off-by: Georgios Vasilakis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants