Skip to content

Commit

Permalink
Merge pull request #33 from dihm/ext_clk_fix
Browse files Browse the repository at this point in the history
External clock status reporting fix
  • Loading branch information
philipstarkey authored Aug 25, 2024
2 parents ae47bf4 + 98f07f0 commit 9020318
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions prawnblaster/prawnblaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ extern "C"{
}

#ifndef PRAWNBLASTER_OVERCLOCK
const char VERSION[16] = "1.1.0";
const char VERSION[16] = "1.1.1";
#else
const char VERSION[16] = "1.1.0-overclock";
const char VERSION[16] = "1.1.1-overclock";
#endif //PRAWNBLASTER_OVERCLOCK

int DEBUG;
Expand Down Expand Up @@ -717,6 +717,9 @@ void resus_callback(void)

// update clock status
clock_status = INTERNAL;

// inform user on next read
fast_serial_printf("System Clock Resus'd\r\n");
}

void loop()
Expand Down Expand Up @@ -1002,9 +1005,9 @@ void loop()
}
else
{
clock_configure_gpin(clk_sys, (src == 2 ? 22 : 20), freq, freq);
// update clock status
// update clock status first so resus can correct if config fails
clock_status = EXTERNAL;
clock_configure_gpin(clk_sys, (src == 2 ? 22 : 20), freq, freq);
fast_serial_printf("ok\r\n");
}
}
Expand Down Expand Up @@ -1388,7 +1391,7 @@ int main()
set_sys_clock_khz(100 * MHZ / 1000, true);

// Temp output 48MHZ clock for debug
clock_gpio_init(21, CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_USB, 1);
//clock_gpio_init(21, CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_USB, 1);

fast_serial_init();

Expand Down

0 comments on commit 9020318

Please sign in to comment.