STM32F302 ADC calibration

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
gab
Posts: 17
Joined: Wed Sep 23, 2020 1:05 pm
Been thanked: 1 time

STM32F302 ADC calibration

Post by gab »

In adc_lld_start() after calling adc_lld_vreg_on() CR register always stay 0x20000000.
After this in adc_lld_calibrate() at line osalDbgAssert(...) program going to chSysHalt().

mcuconf.h:
-------
#define STM32_NO_INIT FALSE
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PREDIV_VALUE 2
#define STM32_PLLMUL_VALUE 9
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
----
gab
Posts: 17
Joined: Wed Sep 23, 2020 1:05 pm
Been thanked: 1 time

Re: STM32F302 ADC calibration

Post by gab »

I try to run testhal/STM32F3xx/ADC example.
Same result.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F302 ADC calibration

Post by Giovanni »

Which version are you using?

Giovanni
gab
Posts: 17
Joined: Wed Sep 23, 2020 1:05 pm
Been thanked: 1 time

Re: STM32F302 ADC calibration

Post by gab »

20.3
gab
Posts: 17
Joined: Wed Sep 23, 2020 1:05 pm
Been thanked: 1 time

Re: STM32F302 ADC calibration

Post by gab »

CPU: STM32F302CBT6
In mcuconf.h:
#define STM32F3xx_MCUCONF

in board.h:
#define STM32F302xC
changing to
#define STM32F302x8
dosn't have effect.

Chibios version 20.3
Post Reply