/* * clock_config.h * * Created: 12/20/2021 12:20:01 PM * Author: david */ #ifndef CLOCK_CONFIG_H_ #define CLOCK_CONFIG_H_ // Crystal oscillator frequency #define FREQ_XTAL_32K (32768UL) // Intended frequency for PDM = 1.024MHz // Source is 32768 Hz crystal oscillator // Want to run somewhere around 96MHz, but an even multiple of 1.024MHz // 1.024 * 96 = 98.304 MHz // 98.304MHz / 32.768kHz = 3000 // Freq will be 98.304 MHz #define CONFIG_CLOCK_PLLAMULT (3000UL) #define MAIN_CLOCK_FREQ (FREQ_XTAL_32K * CONFIG_CLOCK_PLLAMULT) // Intended frequency for USB is 48MHz // Source is 32768 Hz crystal oscillator // 32768 * 1465 = 48.005MHz #define CONFIG_CLOCK_PLLBMULT (1465UL) #define USB_CLOCK_FREQ (FREQ_XTAL_32K * CONFIG_CLOCK_PLLBMULT) void ClockConfig(void); void efc_read_unique_id(uint32_t *p_ul_buf, uint32_t ul_size); #endif /* CLOCK_CONFIG_H_ */