WDT about 8s

This commit is contained in:
Miducc
2023-06-23 09:41:00 +07:00
parent 05553db313
commit 27e209b42d
2 changed files with 29 additions and 0 deletions

23
src/osc_configuration.c Normal file
View File

@@ -0,0 +1,23 @@
#include "BA45F5250.h"
#include "stdint.h"
#include "build-in.h"
#include "osc_configuration.h"
#include "macro_define.h"
void osc_init()
{
// Control system clock
_scc = 0b00000000;
// Control HIRC clock
#if _HIRCC_8M
_hircc = 0b00001001;
#elif _HIRCC_4M
_hircc = 0b00000101;
#else
_hircc = 0b00000001;
#endif
// Control watchdog timer
_wdtc = 0b01010111;
}