SIMPLIFY! Always run the main clock at 8 MHz

This commit is contained in:
Joey Castillo
2021-08-30 14:03:43 -04:00
parent 27ce7003b3
commit 53053ad89a
7 changed files with 11 additions and 60 deletions

View File

@@ -53,8 +53,7 @@
#include "peripheral_clk_config.h"
void watch_enable_debug_uart(uint32_t baud) {
uint32_t freq = watch_get_cpu_speed();
uint64_t br = (uint64_t)65536 * ((freq * 4) - 16 * baud) / (freq * 4);
uint64_t br = (uint64_t)65536 * ((CONF_CPU_FREQUENCY * 4) - 16 * baud) / (CONF_CPU_FREQUENCY * 4);
gpio_set_pin_direction(D1, GPIO_DIRECTION_IN);
gpio_set_pin_function(D1, PINMUX_PB00C_SERCOM3_PAD2);