better solution for the previous problem (CLK prescaler selection based on clock source)