Increase ADC sampling time to increase accuracy
This commit is contained in:
parent
e6205458c5
commit
a5c15cd746
@ -1,4 +1,6 @@
|
|||||||
#MicroXplorer Configuration settings - do not modify
|
#MicroXplorer Configuration settings - do not modify
|
||||||
|
ADC.IPParameters=SamplingTime
|
||||||
|
ADC.SamplingTime=ADC_SAMPLETIME_239CYCLES_5
|
||||||
File.Version=6
|
File.Version=6
|
||||||
GPIO.groupedBy=Group By Peripherals
|
GPIO.groupedBy=Group By Peripherals
|
||||||
KeepUserPlacement=false
|
KeepUserPlacement=false
|
||||||
@ -95,7 +97,7 @@ ProjectManager.KeepUserCode=false
|
|||||||
ProjectManager.LastFirmware=true
|
ProjectManager.LastFirmware=true
|
||||||
ProjectManager.LibraryCopy=1
|
ProjectManager.LibraryCopy=1
|
||||||
ProjectManager.MainLocation=Src
|
ProjectManager.MainLocation=Src
|
||||||
ProjectManager.NoMain=false
|
ProjectManager.NoMain=true
|
||||||
ProjectManager.PreviousToolchain=
|
ProjectManager.PreviousToolchain=
|
||||||
ProjectManager.ProjectBuild=false
|
ProjectManager.ProjectBuild=false
|
||||||
ProjectManager.ProjectFileName=AdaptiveBrightnessFirmware.ioc
|
ProjectManager.ProjectFileName=AdaptiveBrightnessFirmware.ioc
|
||||||
|
@ -55,7 +55,7 @@ void MX_ADC_Init(void)
|
|||||||
*/
|
*/
|
||||||
sConfig.Channel = ADC_CHANNEL_0;
|
sConfig.Channel = ADC_CHANNEL_0;
|
||||||
sConfig.Rank = ADC_RANK_CHANNEL_NUMBER;
|
sConfig.Rank = ADC_RANK_CHANNEL_NUMBER;
|
||||||
sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5;
|
sConfig.SamplingTime = ADC_SAMPLETIME_239CYCLES_5;
|
||||||
if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
|
if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
|
Loading…
Reference in New Issue
Block a user