Clock Configuration in Zephyr

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Clock Configuration in Zephyr

Clock Configuration in Zephyr

If you have any questions or issues, please Ask a new question, and the NXP support team can address it there.

Long term, NXP hopes clocks will be enabled and configured using the Clock Management Subsystem, but this is not adopted yet.  For now, most clocks at the SOC level are configured by source code in the startup code.  Newer boards configure these clocks in the board.c file.  For example, frdm_mcxn947_init() enables these clocks for FRDM-MCXN947 board. 

Clock configuration is specific to the board and the application.  For a custom board, it is expected the board owner will review all the clock configuration in these files, and configure as needed for that board.  

Some older SOCs enable the clocks in soc.c.  For example, clock_init() enables these clocks for the i.MX RT10xx SOCs.  When clock_init() is included in the SOC file, it is declared as weak so it can be overridden without needing to modify soc.c.  Custom boards can add a custom clock_init() in their board files to override this function.

Peripheral Clocks

NXP has a large portfolio of boards supported for different SOCs with many peripheral options and multiple instance of peripherals.  Many of these instances cannot easily be tested when Zephyr support is added for a board. 

Most peripheral clocks are enabled in clock_init() in soc.c or board source files discussed above.  One common issue Zephyr users have when enabling or adding a peripheral instance on their board, is that instance is not clocked properly.  Typically enabling the peripheral clock is simple once this is known.

 

Return to Zephyr Knowledge Hub

无评分
版本历史
最后更新:
星期三
更新人: