You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking inside the C source code, can someone explane the following function? Especially the used values.
void picoemp_enable_pwm(float duty_frac) {
if(pwm_enabled) {
return;
}
// Get PWM slice
uint32_t slice = pwm_gpio_to_slice_num(PIN_OUT_HVPWM);
gpio_set_function(PIN_OUT_HVPWM, GPIO_FUNC_PWM);
// Set up clock divider
float target_frequency = 25;
float divider = clock_get_hz(clk_sys) / target_frequency;
pwm_config config = pwm_get_default_config();
pwm_config_set_clkdiv(&config, divider);
pwm_config_set_wrap(&config, UINT16_MAX);
// Init PWM, but don't start it yet
pwm_init(slice, &config, false);
// pwm_set_chan_level(slice, PWM_CHAN_A, 800); // pretty sure this line is pointless
pwm_set_freq_duty(slice, PWM_CHAN_A, 2500, duty_frac);
pwm_set_enabled(slice, true);
pwm_enabled = true;
}
what the The duty_frac is used for? How is correlated to the power?
What are the bahavior of the following parameters?
pulse_time=5, pulse_power=0.012200
Are parameters that it's worth a change?
All are changable parameters from serial interface, bat is not explaned haw they can be used and wht they produce on charge of HV.
The text was updated successfully, but these errors were encountered:
That has the short note that things were basically just empirically tuned! So there's no real magic... you could play around with things and see what happens to the charge voltage and/or recovery time?
I'm looking inside the C source code, can someone explane the following function? Especially the used values.
what the The duty_frac is used for? How is correlated to the power?
What are the bahavior of the following parameters?
pulse_time=5, pulse_power=0.012200
Are parameters that it's worth a change?
All are changable parameters from serial interface, bat is not explaned haw they can be used and wht they produce on charge of HV.
The text was updated successfully, but these errors were encountered: