Now PG9 toggles at the very beginning of every laser current step. Purpose: tell ADC that step started/ended for correct averaging.

This commit is contained in:
2025-10-22 12:00:48 +03:00
parent 03bb95db58
commit f2004bdc35
7 changed files with 11884 additions and 11887 deletions

View File

@ -448,14 +448,17 @@ int main(void)
if (TIM10_coflag)
{
Set_LTEC(TT_CHANGE_CURR_1, task.current_param);
HAL_GPIO_TogglePin(GPIOG, GPIO_PIN_9); //toggle PG9. Change indicates that current step started.
//TIM11 -> CNT = 0; // to link modulator phase
//TIM4 -> CNT = 0; // to link ADC clock phase
task.current_param += task.delta_param;
TO10 = 0;
TIM10_coflag = 0;
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_9, GPIO_PIN_SET); // set the current step laser current trigger
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_9, GPIO_PIN_RESET);
//HAL_GPIO_WritePin(GPIOG, GPIO_PIN_9, GPIO_PIN_SET); // set the current step laser current trigger
//HAL_GPIO_WritePin(GPIOG, GPIO_PIN_9, GPIO_PIN_RESET);
//*
if (step_counter % trigger_step == 0){ //trigger at every 60 step
OUT_trigger(trigger_counter);

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.