diff options
| -rw-r--r-- | embassy-rp/src/clocks.rs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs index 3975e7e79..47e71c448 100644 --- a/embassy-rp/src/clocks.rs +++ b/embassy-rp/src/clocks.rs | |||
| @@ -152,11 +152,6 @@ pub enum PeriClkSrc { | |||
| 152 | /// | 152 | /// |
| 153 | /// The voltage regulator can be configured for different output voltages. | 153 | /// The voltage regulator can be configured for different output voltages. |
| 154 | /// Higher voltages allow for higher clock frequencies but increase power consumption and heat. | 154 | /// Higher voltages allow for higher clock frequencies but increase power consumption and heat. |
| 155 | /// | ||
| 156 | /// **Note**: For RP235x the maximum voltage is 1.30V, unless unlocked by setting unless the voltage limit | ||
| 157 | /// is disabled using the disable_voltage_limit field in the vreg_ctrl register. For lack of practical use at this | ||
| 158 | /// point in time, this is not implemented here. So the maximum voltage in this enum is 1.30V for now. | ||
| 159 | #[cfg(feature = "rp2040")] | ||
| 160 | #[repr(u8)] | 155 | #[repr(u8)] |
| 161 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | 156 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
| 162 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 157 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -190,7 +185,7 @@ pub enum CoreVoltage { | |||
| 190 | /// The voltage regulator can be configured for different output voltages. | 185 | /// The voltage regulator can be configured for different output voltages. |
| 191 | /// Higher voltages allow for higher clock frequencies but increase power consumption and heat. | 186 | /// Higher voltages allow for higher clock frequencies but increase power consumption and heat. |
| 192 | /// | 187 | /// |
| 193 | /// **Note**: For RP235x the maximum voltage is 1.30V, unless unlocked by setting unless the voltage limit | 188 | /// **Note**: The maximum voltage is 1.30V, unless unlocked by setting unless the voltage limit |
| 194 | /// is disabled using the disable_voltage_limit field in the vreg_ctrl register. For lack of practical use at this | 189 | /// is disabled using the disable_voltage_limit field in the vreg_ctrl register. For lack of practical use at this |
| 195 | /// point in time, this is not implemented here. So the maximum voltage in this enum is 1.30V for now. | 190 | /// point in time, this is not implemented here. So the maximum voltage in this enum is 1.30V for now. |
| 196 | #[cfg(feature = "_rp235x")] | 191 | #[cfg(feature = "_rp235x")] |
| @@ -1092,20 +1087,14 @@ pub(crate) unsafe fn init(config: ClockConfig) { | |||
| 1092 | let pll_sys_freq = match config.sys_pll { | 1087 | let pll_sys_freq = match config.sys_pll { |
| 1093 | Some(sys_pll_config) => match configure_pll(pac::PLL_SYS, config.hz, sys_pll_config) { | 1088 | Some(sys_pll_config) => match configure_pll(pac::PLL_SYS, config.hz, sys_pll_config) { |
| 1094 | Ok(freq) => freq, | 1089 | Ok(freq) => freq, |
| 1095 | #[cfg(feature = "defmt")] | 1090 | Err(e) => panic!("Failed to configure PLL_SYS: {:?}", e), |
| 1096 | Err(e) => panic!("Failed to configure PLL_SYS: {}", e), | ||
| 1097 | #[cfg(not(feature = "defmt"))] | ||
| 1098 | Err(_e) => panic!("Failed to configure PLL_SYS"), | ||
| 1099 | }, | 1091 | }, |
| 1100 | None => 0, | 1092 | None => 0, |
| 1101 | }; | 1093 | }; |
| 1102 | let pll_usb_freq = match config.usb_pll { | 1094 | let pll_usb_freq = match config.usb_pll { |
| 1103 | Some(usb_pll_config) => match configure_pll(pac::PLL_USB, config.hz, usb_pll_config) { | 1095 | Some(usb_pll_config) => match configure_pll(pac::PLL_USB, config.hz, usb_pll_config) { |
| 1104 | Ok(freq) => freq, | 1096 | Ok(freq) => freq, |
| 1105 | #[cfg(feature = "defmt")] | 1097 | Err(e) => panic!("Failed to configure PLL_USB: {:?}", e), |
| 1106 | Err(e) => panic!("Failed to configure PLL_USB: {}", e), | ||
| 1107 | #[cfg(not(feature = "defmt"))] | ||
| 1108 | Err(_e) => panic!("Failed to configure PLL_USB"), | ||
| 1109 | }, | 1098 | }, |
| 1110 | None => 0, | 1099 | None => 0, |
| 1111 | }; | 1100 | }; |
