Setup timing better (fuses, clock speed, TCB clock speed)

This commit is contained in:
Allen Hill
2023-09-10 16:02:06 -04:00
parent 09bcd75811
commit 7245695bc7
4 changed files with 153 additions and 35 deletions
+3
View File
@@ -23,6 +23,7 @@
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/sfr_defs.h>
#include <avr/xmega.h>
#include <stdint.h>
#include "avclandrv.h"
@@ -217,6 +218,8 @@ void Setup() {
printAllFrames = 1;
echoCharacters = 1;
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLB, (CLK_PRESCALE | CLK_PRESCALE_DIV));
general_GPIO_init();
// Setup RTC as 1 sec periodic timer