mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-07-26 10:38:52 +00:00
fix clock source change on praline (#3233)
* fix clock source change on praline * whoops
This commit is contained in:
@@ -419,7 +419,11 @@ std::string ClockManager::get_freq() {
|
|||||||
to_string_dec_uint((reference.frequency % 1000000) / 100, 4, '0') + " MHz";
|
to_string_dec_uint((reference.frequency % 1000000) / 100, 4, '0') + " MHz";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void portapack_tcxo_enable() {
|
void ClockManager::portapack_tcxo_enable() {
|
||||||
|
#ifdef PRALINE
|
||||||
|
gpio_control::clkin_ctrl.setActive();
|
||||||
|
set_p1_control(P1_Function::P22_ClkIn);
|
||||||
|
#endif
|
||||||
portapack::io.reference_oscillator(true);
|
portapack::io.reference_oscillator(true);
|
||||||
|
|
||||||
/* Delay >10ms at 96MHz clock speed for reference oscillator to start. */
|
/* Delay >10ms at 96MHz clock speed for reference oscillator to start. */
|
||||||
@@ -428,7 +432,10 @@ static void portapack_tcxo_enable() {
|
|||||||
while (delay--);
|
while (delay--);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void portapack_tcxo_disable() {
|
void ClockManager::portapack_tcxo_disable() {
|
||||||
|
#ifdef PRALINE
|
||||||
|
gpio_control::clkin_ctrl.setInactive();
|
||||||
|
#endif
|
||||||
portapack::io.reference_oscillator(false);
|
portapack::io.reference_oscillator(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,9 @@ class ClockManager {
|
|||||||
|
|
||||||
void enable_clock_output(bool enable);
|
void enable_clock_output(bool enable);
|
||||||
|
|
||||||
|
void portapack_tcxo_enable();
|
||||||
|
void portapack_tcxo_disable();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
I2C& i2c0;
|
I2C& i2c0;
|
||||||
si5351::Si5351& clock_generator;
|
si5351::Si5351& clock_generator;
|
||||||
|
|||||||
@@ -361,8 +361,8 @@ constexpr PinMap map_p1_ctrl0{2, 10, 0, 14, 0}; // SCU: 2, 10 | GPIO: 0, 14
|
|||||||
constexpr PinMap map_p1_ctrl1{6, 8, 5, 16, 4};
|
constexpr PinMap map_p1_ctrl1{6, 8, 5, 16, 4};
|
||||||
constexpr PinMap map_p1_ctrl2{6, 9, 3, 5, 0};
|
constexpr PinMap map_p1_ctrl2{6, 9, 3, 5, 0};
|
||||||
|
|
||||||
constexpr PinMap map_p2_ctrl0{8, 3, 7, 3, 4};
|
constexpr PinMap map_p2_ctrl0{8, 3, 7, 3, 0};
|
||||||
constexpr PinMap map_p2_ctrl1{8, 4, 7, 4, 4};
|
constexpr PinMap map_p2_ctrl1{8, 4, 7, 4, 0};
|
||||||
|
|
||||||
constexpr PinMap map_trigger_out{2, 6, 5, 6, 4};
|
constexpr PinMap map_trigger_out{2, 6, 5, 6, 4};
|
||||||
constexpr PinMap map_trigger_in{13, 12, 6, 26, 4};
|
constexpr PinMap map_trigger_in{13, 12, 6, 26, 4};
|
||||||
|
|||||||
Reference in New Issue
Block a user