Stabilize USB control firmware

This commit is contained in:
Ayzen
2026-04-26 18:39:55 +03:00
parent ea1fbb071d
commit d32db245fa
51 changed files with 11583 additions and 11479 deletions

View File

@ -40,6 +40,10 @@ uint16_t adc_mux_read_external_channel(uint8_t channel_index)
++delay_counter;
}
LL_SPI_Disable(SPI4);
while (delay_counter < 500u)
{
++delay_counter;
}
HAL_GPIO_WritePin(ADC_MPD1_CS_GPIO_Port, ADC_MPD1_CS_Pin, GPIO_PIN_SET);
result = LL_SPI_ReceiveData16(SPI4);
}
@ -58,6 +62,10 @@ uint16_t adc_mux_read_external_channel(uint8_t channel_index)
++delay_counter;
}
LL_SPI_Disable(SPI5);
while (delay_counter < 500u)
{
++delay_counter;
}
HAL_GPIO_WritePin(ADC_MPD2_CS_GPIO_Port, ADC_MPD2_CS_Pin, GPIO_PIN_SET);
result = LL_SPI_ReceiveData16(SPI5);
}
@ -76,6 +84,10 @@ uint16_t adc_mux_read_external_channel(uint8_t channel_index)
++delay_counter;
}
LL_SPI_Disable(SPI4);
while (delay_counter < 500u)
{
++delay_counter;
}
HAL_GPIO_WritePin(ADC_ThrLD1_CS_GPIO_Port, ADC_ThrLD1_CS_Pin, GPIO_PIN_SET);
result = LL_SPI_ReceiveData16(SPI4);
}
@ -94,6 +106,10 @@ uint16_t adc_mux_read_external_channel(uint8_t channel_index)
++delay_counter;
}
LL_SPI_Disable(SPI5);
while (delay_counter < 500u)
{
++delay_counter;
}
HAL_GPIO_WritePin(ADC_ThrLD2_CS_GPIO_Port, ADC_ThrLD2_CS_Pin, GPIO_PIN_SET);
result = LL_SPI_ReceiveData16(SPI5);
}