Valid clock settings unaccessible in Config Tools

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

Valid clock settings unaccessible in Config Tools

767 次查看
stefano-quantic
Contributor III

For iMXRT1176, I'm using Config Tools to configure the system clocks.
For ARM PLL, I can select a PREDIV (only option: /1) and a VDIV (options: [52, 104], step by 1).
Then, after the ARM_PLL_BYPASS, there is ARM_PLL_POST_DIV, selectable from {/1, /2, /4, /8}.

However, the SDK libraries have these parameters organized a bit differently (also in the code generated by the Config Tools, in "clock_config.c").
The relevant parameters are:
typedef struct _clock_arm_pll_config
{
clock_pll_post_div_t postDivider; /*!< Post divider. */
uint32_t loopDivider; /*!< PLL loop divider. Valid range: 104-208. */
} clock_arm_pll_config_t;
typedef enum _clock_pll_post_div
{
kCLOCK_PllPostDiv2 = 0U, /*!< Divide by 2. */
kCLOCK_PllPostDiv4 = 1U, /*!< Divide by 4. */
kCLOCK_PllPostDiv8 = 2U, /*!< Divide by 8. */
kCLOCK_PllPostDiv1 = 3U, /*!< Divide by 1. */
} clock_pll_post_div_t;

(note: the "loop divider" actually multiplies the frequency, e.g. if it is set to 100, the frequency is multiplied from 24MHz to 2.4GHz)
So, as you can see, the post divider has the same options, but the loop divider is in the range [104, 208] instead of [52, 104]. They are actually equivalent, because the Config Tools already take into account a fixed /2 division that is intrinsic in the PLL, whereas the relevant register bits ARM_PLL_CTRL[DIV_SELECT] do indeed take a value in [104, 208].
The reference manual (IMXRT1179RM, Rev. 2, 06/2023, p.1626) states the following:
DIV_SELECT
This field controls the pll loop divider. Valid range for divider value: 104-208.
Fout = Fin * div_select/2.0

In the end, all the calculations are correct, but the Config Tools prevents you from choosing all possible frequencies.
The actual range is:
[104, 208]/2 = {52, 52.5, 53, ..., 103.5, 104}
Whereas the Config Tools only allow the integer values to be selected: [52, 104]

It would be better, and also less confusing, to have Config Tools let you select a value in [104, 208], and have a fixed "/2" block drawn in series with the ARM_PLL block, in the graphical "Clocks diagram" tab of "Config Tools | Clocks".
See the attached picture for the proposed changes.

0 项奖励
回复
1 回复

728 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @stefano-quantic,

Thanks for your complete feedback and suggestion, as you point out ConfigTools not use all frequencies supported mentioned in IMXRT1170RM Rev. 2 using [52, 104] range instead of [104, 208].

We are going to let this known to the team in charge.

Thanks again for the feedback.

Best regards, Raul.

0 项奖励
回复