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-08 02:59 AM
The idea is to reduce program compiling time. Now it is taking 20ms, trying to reduce compiling time from 20ms to 1ms.( need to speed up ) And there are no other peripherals used.
2024-02-08 03:06 AM
Compilation time? or execution time??
Unfortunately you add more confusions than clarifying your expectations ..
2024-02-08 03:17 AM
oops sorry, execution time.
2024-02-08 05:28 AM
Some tips to speed up program execution:
#if (INSTRUCTION_CACHE_ENABLE != 0U)
__HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
#endif /* INSTRUCTION_CACHE_ENABLE */
#if (DATA_CACHE_ENABLE != 0U)
__HAL_FLASH_DATA_CACHE_ENABLE();
#endif /* DATA_CACHE_ENABLE */
#if (PREFETCH_ENABLE != 0U)
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif /* PREFETCH_ENABLE */
It could be there are some other tips but these are the ones came to my mind at the moment.
2024-02-08 05:35 AM
Maybe you give us some short description of what your "program" is doing.
And how are you measuring these obscure 20 ms ?
Maybe you are using polling functions, while-tick-loops, ... so many things that can go wrong. But letting us guess doesn't help us help you. ;)