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

Add clocks property to CPUs in nRF54L series which can be used to get CPU clock frequency #83527

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions soc/nordic/nrf54l/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <nrf_erratas.h>
#include <system_nrf54l.h>
#include <zephyr/drivers/clock_control/nrf_clock_control.h>

LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);

Expand All @@ -43,9 +44,9 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
static int nordicsemi_nrf54l_init(void)
{
/* Update the SystemCoreClock global variable with current core clock
* retrieved from hardware state.
* retrieved from the DT.
*/
SystemCoreClockUpdate();
SystemCoreClock = NRF_PERIPH_GET_FREQUENCY(DT_NODELABEL(cpu));
Copy link
Member

Choose a reason for hiding this comment

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

I don't quite get this change. It will only correct the SystemCoreClock value until the first call to SystemCoreClockUpdate(). Is that the intention?


#if defined(NRF_APPLICATION)
/* Enable ICACHE */
Expand Down
Loading