diff --git a/firmware/common/hackrf_core.c b/firmware/common/hackrf_core.c index 7cf62a97..215c5528 100644 --- a/firmware/common/hackrf_core.c +++ b/firmware/common/hackrf_core.c @@ -39,12 +39,10 @@ #include "ice40_spi.h" #include "platform_detect.h" #include "clkin.h" -#include "selftest.h" #include #include #include #include -#include #if (defined HACKRF_ONE || defined PRALINE) #include "portapack.h" @@ -898,29 +896,6 @@ void cpu_clock_init(void) CGU_BASE_SSP1_CLK = CGU_BASE_SSP1_CLK_AUTOBLOCK(1) | CGU_BASE_SSP1_CLK_CLK_SEL(CGU_SRC_PLL1); -#ifndef RAD1O - /* Enable 32kHz oscillator */ - CREG_CREG0 &= ~(CREG_CREG0_PD32KHZ | CREG_CREG0_RESET32KHZ); - CREG_CREG0 |= CREG_CREG0_EN32KHZ; - - /* Allow 1ms to start up. */ - delay_us_at_mhz(1000, 204); - - /* Use frequency monitor to check 32kHz oscillator is running. */ - CGU_FREQ_MON = CGU_FREQ_MON_RCNT(511) | CGU_FREQ_MON_CLK_SEL(CGU_SRC_32K); - CGU_FREQ_MON |= CGU_FREQ_MON_MEAS_MASK; - while (CGU_FREQ_MON & CGU_FREQ_MON_MEAS_MASK) - ; - uint32_t count = - (CGU_FREQ_MON & CGU_FREQ_MON_FCNT_MASK) >> CGU_FREQ_MON_FCNT_SHIFT; - // We should see a single count, because 511 cycles of the 12MHz internal - // RC oscillator corresponds to 1.39 cycles of the 32768Hz clock. - selftest.rtc_osc_ok = (count == 1); - if (!selftest.rtc_osc_ok) { - selftest.report.pass = false; - } -#endif - #if (defined JAWBREAKER || defined HACKRF_ONE || defined PRALINE) /* Disable unused clocks */ /* Start with PLLs */ diff --git a/firmware/common/selftest.h b/firmware/common/selftest.h index 95e0184e..f083de3c 100644 --- a/firmware/common/selftest.h +++ b/firmware/common/selftest.h @@ -40,9 +40,6 @@ typedef struct { #endif uint8_t si5351_rev_id; bool si5351_readback_ok; -#ifndef RAD1O - bool rtc_osc_ok; -#endif #ifdef PRALINE bool sgpio_rx_ok; bool xcvr_loopback_ok; diff --git a/firmware/hackrf_usb/usb_api_selftest.c b/firmware/hackrf_usb/usb_api_selftest.c index 7f251cc1..29cbc8a1 100644 --- a/firmware/hackrf_usb/usb_api_selftest.c +++ b/firmware/hackrf_usb/usb_api_selftest.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "usb_api_selftest.h" #include "selftest.h" #include "platform_detect.h" @@ -95,11 +94,6 @@ void generate_selftest_report(void) } append(&s, &c, "\n"); #endif -#ifndef RAD1O - append(&s, &c, "32kHz oscillator: "); - append(&s, &c, selftest.rtc_osc_ok ? "PASS" : "FAIL"); - append(&s, &c, "\n"); -#endif #ifdef PRALINE append(&s, &c, "SGPIO RX test: "); append(&s, &c, selftest.sgpio_rx_ok ? "PASS" : "FAIL");