Stabilize USB control firmware
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user