-
Notifications
You must be signed in to change notification settings - Fork 35
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
RT118x clock initialization #185
RT118x clock initialization #185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not doing a detailed review of this feature, but let me know if there's anything you'd like specific feedback on. The root clocks affected by the init
routine LGTM at first glance; I shared my measurements.
Requesting changes around the unconditional use of defmt
in ccm_118x.rs
. See inline comments.
&mut CCM, | ||
&mut DCDC, | ||
&mut PHY_LDO, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table shows my root clock measurements after this call returns. I took these measurements using the debugger. These frequencies LGTM.
Name | Current (Hz) | Min (Hz) | Max (Hz) | Max-Min (Hz)
------------------------------------------------------------------------------------------
FLEXSPI1_CLK_ROOT | 132934656 | 132934656 | 132935168 | 512
M33_CLK_ROOT | 240020992 | 240020992 | 240021504 | 512
OSC_24M_OUT | 24002048 | 24002048 | 24002048 | 0
OSC_RC_24M | 24113152 | 24112640 | 24114176 | 1536
OSC_RC_400M | 399403008 | 399403008 | 399549952 | 146944
PLL_480_DIV2 | 240020480 | 240020480 | 240021504 | 1024
PLL_480_OUT | 480041984 | 480040960 | 480043008 | 2048
PLL_480_PFD0 | 664673792 | 664672768 | 664675328 | 2560
PLL_480_PFD1 | 0 | ??? | 0 | ???
PLL_480_PFD2 | 0 | ??? | 0 | ???
PLL_480_PFD3 | 0 | ??? | 0 | ???
Here is the tool for folks who want to reproduce this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty nice, that means that my diag
module is kind of redundant. It should be at least hidden behind a defmt
feature flag because as of now it's useless without it anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that with changes from cd76df105fe0f1056efca8f37b89ef2485515222
my diag
module stopped working after the write to TRDC1.MDA_W0_2_DFMT1
(thus TODO comment). Did not investigate further but probably I violate some invariants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: Does stop working mean that the TRDC blocked the CPU's access to the CCM observation registers? Or, were the CCM observation measurements erroneous after writing to TRDC1.MDA_W0_2_DFMT1
?
Manipulating TRDC1.MDA_W0_2_DFMT1
doesn't seem to affect the debugger's access to the CCM's observation registers. I merged cd76df105
into this branch, generating mciantyre@b3b004e. Examples still worked, and I could still generate that table from above.
551813f
to
c994564
Compare
No description provided.