Same issue here on my side. MCU runs just with 400 MHz (even it could be 480 MHz based on spec).
print_log(out, (const char*)"CPU clock : %ld\r\n", SystemCoreClock);
tells me: MCU runs just with 400 MHz (20% slower as possible)
Why nobody could provide help here?
Why Arduino team has not responded?
Why Arduino team cannot provide really Open Source and all source code needed (not just a Closed Library and staying quiet on reasonable requests)?
Never mind - here is the solution:
This file referenced above as "system_clock_override.c" is NOT part of my installation. It is not in my folders (Arduino15, mbed_portenta 3.0.1).
But, I took this (maybe older version) file and it can set 480 MHz.
It does not help to place into API folder (not compiled automatically), you have to take it to your project.
And it has some functions defined again which conflicts with linking the library (doubled defined). Plus define some macros to make the function available.
I have fixed this file (using #if 0 to get rid of existing functions and define what is needed).
See my version of this file attached (downloaded).
system_clock_override.cpp (11.5 KB)
Use it like this:
void setup() {
extern uint8_t SetSysClock_PLL_HSE(uint8_t bypass, bool lowspeed);
SetSysClock_PLL_HSE(1, (bool)false);
It sets now 480 MHz.
Concerns
Touching the clock configuration is very, very sensitive. It does not set just PLL or clock for MCU, it sets also bus and peripheral device clocks.
So, it can happen that MCU has 480 MHz now but other devices, e.g. USB, UART, SPI, SD Card, ETH ... have now a wrong config or a killed config (lost after calling this function).
Or: other functions setting a speed, e.g. UART baud rate, are now off when relying on 400 MHz was core clock (and some PLL divider settings expected).
Luckily, my USB UART is still working as before, with the same speed.
Not sure about SPI and ETH (I need), I have to test if changing core clock affects also other clocks when calling this function.
Use it with care: even core and USB UART seem to be fine - no idea if all other peripherals are still OK.