2024-02-07 01:53 AM
To improve the execution time of a program being run on the board 'Nucleo-439ZI' from the current 20 ms period to less than 1 ms [more than 20 times reduction]. To reduce the same, I tried to switch the clock frequency source of the timer to HSE (8 MHz) instead of the internal clock (32.768KHz) [That means 24 times higher frequency to improve system latency ]. However, some issues are observed when tried by clicking 'Resolve Clock Issues' could not be resolved.
How can I improve execution time from 20ms to 1 ms?
2024-02-07 05:38 AM
No, even you select HSI as clock source (16MHz) you get the same warning. So it's not related to the PLL.
2024-02-07 05:52 AM
2024-02-07 06:13 AM
Yes but, in the middle of the discussion he raised an issue when he switches to HSE (@8MHz) which is related to min HCLK clock.
But frankly from my side I didn't catch yet the problem from his first post (confused with the wording "timer" and internal clock at 32.768KHz).
2024-02-07 07:12 AM
HSE clock-related issue is resolved, missed to connect the oscillator external to the board.
there is issue with 'HSI (High-Speed Internal)' which is 32MHz would that give better execution time?
2024-02-07 07:17 AM
Again the pictures you are sharing have poor resolutions we can't see what is going on. If you can't please share again the ioc file showing these warnings.
Please share readable images.
Also you can click on the boxes in RED to show the warning(s).
2024-02-07 07:20 AM - edited 2024-02-07 07:22 AM
@KumarTP wrote:there is issue with 'HSI (High-Speed Internal)' which is 32MHz
Again, you're going to have to tell us what, exactly, the issue is before anyone can help you with that!
You've seen how the configuration editor tells you what the issue is - in a pop-up - so pay attention to what that pop-up says.
@KumarTP wrote:would that give better execution time?
Again, that depends on what's slowing-down your code - so impossible to say.
See earlier replies:
And:
2024-02-07 08:18 AM
@KumarTP There are really some pros here at work to help you, but as they all pointed out, your basic problem description is still rather cryptic.
What do you exactly mean with "execution time", or of what?
So, which peripherals are you using?
Which clock speed do you need or expect, SYSCLK for the CPU, which for the peripherals?
Note: for a few peripherals / applications HSI might be too inaccurate or jittery.
2024-02-07 10:48 AM
I wish someone could clearly articulate what the problem is here, and where the 32.768 KHz LSE (32 KHz of the LSI) would be involved.
TIM5 can be used to measure LSI/LSE, but not as a source
TIM11 can be used related to HSE_RTC (1 MHz)
Still have no-idea "what" is taking 20 ms, its relationship to the MCU clock, or if 1 ms is remotely realistic.
If it takes 20 ms at 168-180 MHz the F439 normally clocks, there's going to need to be a better explanation of the task being performed, perhaps from the driving requirement rather than the current deficient solution.
2024-02-07 09:26 PM
2024-02-07 10:36 PM
Sigh...
Now you post a pdf including another low resolution picture.
Which still shows that there might be some bad clock settings.
Start reading the datasheet and reference manual about possible PLL settings, compare to the code that Cube throws out.
And what about "execution time 20 ms"?