The MCG + SIM + OSC + RTC + IRC + ... make for a very confusing set of registers to decipher to determine the actual clock setup in use. I have inherited a project and I need to determine how its clocks are configured.
Is there a way I can dump the relevant registers to a file using the debugger and import them into KinetisExpert tool and see what the current clock configuration is?
Hi Chris,
clock_configuration.c can be imported into MCUXpresso Config Tools using main menu - File - Import - Clocks Tool - Import Source Files. Then see "Registers" view.
MCUXpresso Config Tools is updated version (replacement) of Kinetis Expert toolset.
MCUXpresso Config Tools community can be found here: https://community.nxp.com/community/mcuxpresso/mcuxpresso-config
Hope this helps,
regards,
Marek
Thank you Marek,
Does importing the source file require the presence of a special yaml comment? I need to work with source files generated with a very old version of the KSDK (1.1) which are likely going to be missing any special data contained in comments.
Hi Chris,
MCUXPresso Config Tools support SDK from version 2. The older versions are supported by Processor Expert in KDS3.2. Processor Expert is capable to generate clock configuration based on settings in GUI.
Regards
Marek
Hello Chris,
- The clock configuration is a too that directly configure the clock , then generate clock_config.c and .h files.
add the two files into your KSDK project directly .
For example , if we want use 48M core clock , we can directly set core clock to 48M:
From the CLocks Diagram we can see the detail about how to generate the 48M core clock :
- About the clock part , I recommend you refer to the Clocking diagram of Reference Manual of your chip
to analysis : ( below is the clock diagram for k40, please find the right one for your chip)
BR
Alice