clocks tool FRGCTRL_MUL value selection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

clocks tool FRGCTRL_MUL value selection

Jump to solution
1,053 Views
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 Kudos
1 Solution
882 Views
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

View solution in original post

1 Reply
883 Views
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