(int)10000 * (int)64 = (int)0xC400 = (int)-15360
(long)48000000 / (int)-15360 = -3125
(unsigned int)-3125 = 0xF3CB = 62411
Some UL's or typecasts are missing, try this:
# define BUS (48000000ul)
# define CLK ( BUS / (10000ul*PRE) )
(int)10000 * (int)64 = (int)0xC400 = (int)-15360
(long)48000000 / (int)-15360 = -3125
(unsigned int)-3125 = 0xF3CB = 62411
Some UL's or typecasts are missing, try this:
# define BUS (48000000ul)
# define CLK ( BUS / (10000ul*PRE) )