1
0
Fork 0

DacVFb is changed to PC3 for rev0_2 prototype

- This requires a circuit change to connect it to the PoE_PWR_SRC
    through a 1.6k Ohm and 100nF LPF
This commit is contained in:
linuswck 2023-12-21 16:37:53 +08:00
parent 4cf7b7fdf9
commit d3f3608136
2 changed files with 7 additions and 5 deletions

View File

@ -112,7 +112,9 @@ pub fn setup(
shdn: gpioa.pa5.into_push_pull_output(), shdn: gpioa.pa5.into_push_pull_output(),
vref_pin: gpioa.pa6.into_analog(), vref_pin: gpioa.pa6.into_analog(),
itec_pin: gpiob.pb1.into_analog(), itec_pin: gpiob.pb1.into_analog(),
dac_feedback_pin: gpioc.pc0.into_analog(), // Fixme: Flywire is added to Rev0_2 prototype. In Rev0_3, it is connected to PC0
//dac_feedback_pin: gpioc.pc0.into_analog(),
dac_feedback_pin: gpioc.pc3.into_analog(),
vtec_pin: gpiob.pb0.into_analog(), vtec_pin: gpiob.pb0.into_analog(),
max_v: max_v0, max_v: max_v0,
max_i_pos: max_i_pos0, max_i_pos: max_i_pos0,

View File

@ -96,7 +96,9 @@ impl ChannelPins for Channel0 {
type ShdnPin = PA5<Output<PushPull>>; type ShdnPin = PA5<Output<PushPull>>;
type VRefPin = PA6<Analog>; type VRefPin = PA6<Analog>;
type ItecPin = PB1<Analog>; type ItecPin = PB1<Analog>;
type DacFeedbackPin = PC0<Analog>; // Fixme: Flywire is added to Rev0_2 prototype. In Rev0_3, it is connected to PC0
//type DacFeedbackPin = PC0<Analog>;
type DacFeedbackPin = PC3<Analog>;
type VTecPin = PB0<Analog>; type VTecPin = PB0<Analog>;
type MaxVPin = PwmChannel<TIM4, 1>; type MaxVPin = PwmChannel<TIM4, 1>;
type MaxIPosPin = PwmChannel<TIM4, 2>; type MaxIPosPin = PwmChannel<TIM4, 2>;
@ -315,9 +317,7 @@ impl MAX1968 {
} }
pub fn get_dac_vfb(&mut self) -> ElectricPotential { pub fn get_dac_vfb(&mut self) -> ElectricPotential {
// Fixme: Rev0_2 does not have this feature self.adc_read(AdcReadTarget:: DacVfb, 1)
unimplemented!()
//self.adc_read(AdcReadTarget:: DacVfb, 1)
} }
pub fn get_tec_i(&mut self) -> ElectricCurrent { pub fn get_tec_i(&mut self) -> ElectricCurrent {