2018-12-09 08:35 PM
I'm using a STM32F429ZI Nucleo-144, and need a counter/delay function with 1 microsecond resolution, but want to keep the HAL_Delay function at 1 millisecond resolution for other uses.
I'm looking at potentially reconfiguring the SysTick interrupt to 1 microsecond by modifying the call to HAL_SYSTICK_Config, using HAL_SYSTICK_Callback to create a counter with 1 microsecond resolution, and then overloading the weak HAL_Delay function to take the faster SysTick into account and keep it at 1 ms. But HAL_SYSTICK_Config is called from SystemClock_Config which is code generated by STM32Core, so it will be overwritten next time I regenerate the project. Is there a better way to obtain a counter/delay with 1 microsecond resolution?