clocks tool FRGCTRL_MUL value selection

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

clocks tool FRGCTRL_MUL value selection

跳至解决方案
3,239 次查看
cedricjehasse
Contributor II

Hi,

I'm trying to configure clocks for an LPCXpresso54018, SDK version is: SDK Version: KSDK 2.4.2 (2018-09-14).

I want to configure the FRG_clock.

The value for FRGCTRL_MUL is set to *256, and can't be changed. It's only possible to set FRGCTRL_DIV.

From the LPC540xx reference manual, it looks like FRGCTRL_DIV should always set to 0xff. But i should be able to set FRGCTRL_MUL.

I've added screenshots showing the dropdown menu's for both settings.

Am i doing something wrong? Or is it a problem in clocks tool?

thanks,

Cedric

0 项奖励
回复
1 解答
3,068 次查看
marek_neuzil
NXP Employee
NXP Employee

Hi Cedric,

I have checked the implementation and it seems that there are selected confusing names of the divider and multiplier only. The clock model works properly.

If you look into reference manual (UM11060) you can find the following expression for computing the FRG clock:

Flexcomm Interface function clock = (clock selected via FRGCLKSEL) / (1 + MULT / DIV)

And also the following definition of the related bitfields:

pastedImage_1.png

It is mean that the MULT bitfield works as the divider and DIV bitfield works as the multiplier part of the fractional divider.

In the clock model (clock diagram) the FRGCTRL_MUL multiplier controls the DIV bitfield and must be 0xFF. The FRGCTRL_DIV divider controls the MULT bitfield (1+MULT/0xFF = (0xFF + MULT) / 0xFF), i.e. the divider provides values 256 - 511.

It means that the clock model works properly and provide the correct values in the FRGCTRL register (you can also check the bitfield values in the Registers window of the Clocks tool).

Best Regards,

Marek Neuzil

在原帖中查看解决方案

1 回复
3,069 次查看
marek_neuzil
NXP Employee
NXP Employee

Hi Cedric,

I have checked the implementation and it seems that there are selected confusing names of the divider and multiplier only. The clock model works properly.

If you look into reference manual (UM11060) you can find the following expression for computing the FRG clock:

Flexcomm Interface function clock = (clock selected via FRGCLKSEL) / (1 + MULT / DIV)

And also the following definition of the related bitfields:

pastedImage_1.png

It is mean that the MULT bitfield works as the divider and DIV bitfield works as the multiplier part of the fractional divider.

In the clock model (clock diagram) the FRGCTRL_MUL multiplier controls the DIV bitfield and must be 0xFF. The FRGCTRL_DIV divider controls the MULT bitfield (1+MULT/0xFF = (0xFF + MULT) / 0xFF), i.e. the divider provides values 256 - 511.

It means that the clock model works properly and provide the correct values in the FRGCTRL register (you can also check the bitfield values in the Registers window of the Clocks tool).

Best Regards,

Marek Neuzil