Commit c4582083 authored by Jacques Labaisse's avatar Jacques Labaisse
Browse files

add function to move adc trig

parent 25b726de
......@@ -35,15 +35,16 @@
void main(void)
{
{
opalib_quick_start_set_hardware_version(v_1_1_2);
opalib_quick_start_init_voltage(opalib_pid_voltage_calculation_and_pwm_update, 50);
opalib_pid_voltage_init_buck(15, 0.002159, 41.77, 0, 50);
opalib_pid_voltage_init_buck(0.5, 20, 0.00216, 41.7, 0, 50);
opalib_quick_start_launch_task();
opalib_quick_start_launch_task();
printf("Go\n");
}
......@@ -80,6 +80,7 @@ void hrtim_pwm_set(hrtim_t dev, hrtim_tu_t tu, uint16_t value, uint16_t shift);
void hrtim_init_current();
void hrtim_init_voltage();
void hrtim_update_adc_trig(uint16_t value);
#ifdef __cplusplus
......
......@@ -37,7 +37,7 @@ void hrtim_init_voltage()
{
leg_init(true);
hrtim_adc_trigger_en(0, ADC1R, AD13_TAC3);
hrtim_cmp_set(0, TIMA, CMP3xR, 1);
hrtim_cmp_set(0, TIMA, CMP3xR, 6800);
}
void hrtim_update_adc_trig(uint16_t value){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment