freq count fw: change to use CSR

morgan 2024-03-28 12:23:26 +08:00
parent adc7554f79
commit 84b5a5f2e3
1 changed files with 1 additions and 2 deletions

View File

@ -450,9 +450,8 @@ pub mod wrpll {
fn get_freq_counts(timer: &mut GlobalTimer) -> (u32, u32) {
unsafe {
csr::wrpll::frequency_counter_update_en_write(1);
csr::wrpll::frequency_counter_update_write(1);
timer.delay_us(150_000); // 8ns << TIMER_WIDTH
csr::wrpll::frequency_counter_update_en_write(0);
#[cfg(wrpll_ref_clk = "GT_CDR")]
let ref_count = csr::wrpll::frequency_counter_counter_rtio_rx0_read();
#[cfg(wrpll_ref_clk = "SMA_CLKIN")]