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 02:01 AM
@KumarTP wrote:some issues are observed when tried by clicking 'Resolve Clock Issues' could not be resolved.
Well, nobody can help you there without knowing what, exactly, those issues were!
@KumarTP wrote:How can I improve execution time from 20ms to 1 ms?
first you need to know what's taking all the time!
If it's in busy-wait loops, or similar, then no amount of speeding up the clock is going to help.
2024-02-07 02:01 AM
Hello @KumarTP
Would you share your IOC file in .text format? or maybe a screenshot of your clock tree would be sufficient.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-07 02:07 AM
Please find the below screenshots
2024-02-07 02:12 AM
Screenshots not clear.. Please share better image resolution.
2024-02-07 02:29 AM
As @SofLit said, those screenshots are too low resolution.
However, I think the fact that there are RED boxes in the first one suggests that you have exceeded the maximum limits at those points?
2024-02-07 02:45 AM
Pretty sure it's not going to be running off the 32 KHz HSI source.
For order of magnitude improvements you might need to change your approach.
You have not articulated your problem well, or illustrated it clearly. Try harder.
2024-02-07 03:01 AM
2024-02-07 03:32 AM
Thank you for the sharing. But the errors are not shown in the shared ioc file!
Also I didn't catch what do you want to do:
@KumarTP wrote:
I tried to switch the clock frequency source of the timer to HSE (8 MHz) instead of the internal clock (32.768KHz)
Which timer?
2024-02-07 03:38 AM
error occurred after I tried to switch the clock frequency source of the timer to HSE (8 MHz) instead of the internal clock (32.768KHz).
I need this program is to be executed in 1ms can I achieve that, How can I do that? Please advise.