From 28a3d95cda797bd585f8f2dce5966bbc021bfdd3 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Mon, 28 Dec 2020 02:14:08 -0300 Subject: [PATCH] Use ADC_RESOLUTION 12 for all STM32 (#20562) --- .../share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h | 4 ++-- platformio.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h index 07e2cad3f..4bd5b63df 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h @@ -114,10 +114,10 @@ extern "C" { #define NUM_ANALOG_INPUTS 7 #define NUM_ANALOG_FIRST 80 -#define ADC_RESOLUTION 12 +//#define ADC_RESOLUTION 12 // PWM resolution -// #define PWM_RESOLUTION 12 +//#define PWM_RESOLUTION 12 #define PWM_FREQUENCY 20000 // >= 20 Khz => inaudible noise for fans #define PWM_MAX_DUTY_CYCLE 255 diff --git a/platformio.ini b/platformio.ini index 924da69a7..2aff7aad2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -725,6 +725,7 @@ build_flags = ${common.build_flags} -std=gnu++14 -DUSBCON -DUSBD_USE_CDC -DTIM_IRQ_PRIO=13 + -DADC_RESOLUTION=12 build_unflags = -std=gnu++11 src_filter = ${common.default_src_filter} + +