How to set up MK22FN512VLH12 clock for crystalless operation? #64815
-
I can build the blinky example Zephyr application, flash it to the FRDM-K22F dev board, and it works fine. However, when flashing the application on our custom board (with a modified LED GPIO according to our schematic), it doesn't blink its LED, and debugging it revealed that it stops upon configuring the clock. It's not surprising since our custom board doesn't have a crystal, unlike the FRDM-K22F board. Before starting to use Zephyr, we've been using a bare metal firmware, and you can see its clock configuration code. I tried to replicate this clock configuration with Zephyr but couldn't so far. In Kconfig, I set:
As for the devicetree, I found the relevant bindings, and set the following based on our bare metal firmware:
The firmware builds without the
Then I checked whether The above begs the question: Am I missing something, or is this a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @mondalaci , And FYI, for the devices that do have the Best regards |
Beta Was this translation helpful? Give feedback.
-
@DerekSnell Thank you very much for your help and clarification! I've been trying to figure out how to modify I could use some expert help, and I'd be happy to pay for it. I probably only need some hand-holding, and I can figure out the rest. Your further help and recommendations of experts would be much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hi @mondalaci , For paid support, these are some options that come to mind:
I hope that helps, best regards |
Beta Was this translation helpful? Give feedback.
Hi @mondalaci ,
The clock_init() used by the K22F device does not have an option to clock from the internal oscillator. And it appears it is not configured by devicetree. If you want to change the clock config for your board, you will need to modify this function.
And FYI, for the devices that do have the
SIM_CHIPCTL_CLKOUTSEL
bitfield, those bits control a CLKOUT pin. This is a mux that selects what clock will be driven externally on that pin. But it does not configure the internal SOC clocks. Since you said "The firmware builds without the clkout-source property", I would leave that property out of your devicetree.Best regards