Question
Bad math continues to persist
I've complained about this before, but it is still broken and shows lack of grasp.
STM32Cube_FW_L4_V1.13.0\Projects\NUCLEO-L432KC\Examples\RTC\RTC_LSI\Src\main.c
The following code results in answers which are a multiple of 8, and loses precision which could otherwise be achieved if the math was thought through and ordered correctly.
/* Frequency computation */
uwLsiFreq = (uint32_t) SystemCoreClock / uwPeriodValue;
uwLsiFreq *= 8;
Should be
uwLsiFreq = (SystemCoreClock * 8) / uwPeriodValue;
