BOARD_BootClockFROHF96M is slower than 48MHz

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

BOARD_BootClockFROHF96M is slower than 48MHz

638 Views
steverudd
Contributor II

I am using the LPC54606J512 processor with an external 12MHz crystal.

IDE is MCUXpresso v10.2.1

See also attached files for clock_config.

See clock_config.h lines 45,46,47  to set for 48MHz I comment out lines 46 & 47, To set for 180MHz I comment out Lines 45 & 46.

In clock_config.c the function void BOARD_BootClockPLL180M(void) has been modded based on the original code and a version found on the internet. NB Line 282 is commented out because it causes the processor to stop dead.

In the main body of the code I am toggling a GPIO pin in order to determine how much time a particular function is taking.

When set to 48MHz the function takes 45mS,

at 96MHz it takes 53mS

at 180MHz it takes 110mS.

In other words setting a higher frequency makes the thing run slower !!

Question:-

Do I have the latest (and correct) clock_config files for the 54606?

1 Reply

559 Views
steverudd
Contributor II

The problem has been solved!  Basically there are a couple of other places in the code containing

CLOCK_AttachClk(kFRO12M_to_MAIN_CLK);

Eg a segment of code copied from an example for driving the SPI bus