git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5000 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
c4dcbb3e98
commit
96fb9a85df
|
@ -152,13 +152,13 @@ static void adc_lld_analog_off(ADCDriver *adcp) {
|
|||
*/
|
||||
static void adc_lld_calibrate(ADCDriver *adcp) {
|
||||
|
||||
chDbgAssert(adcp->adcm->CR == 0, "adc_lld_calibrate(), #1",
|
||||
chDbgAssert(adcp->adcm->CR == ADC_CR_ADVREGEN_0, "adc_lld_calibrate(), #1",
|
||||
"invalid register state");
|
||||
adcp->adcm->CR |= ADC_CR_ADCAL;
|
||||
while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0)
|
||||
;
|
||||
#if STM32_ADC_DUAL_MODE
|
||||
chDbgAssert(adcp->adcs->CR == 0, "adc_lld_calibrate(), #2",
|
||||
chDbgAssert(adcp->adcs->CR == ADC_CR_ADVREGEN_0, "adc_lld_calibrate(), #2",
|
||||
"invalid register state");
|
||||
adcp->adcs->CR |= ADC_CR_ADCAL;
|
||||
while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0)
|
||||
|
|
|
@ -127,7 +127,7 @@ int main(void) {
|
|||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the ADC1 driver and the thermal sensor.
|
||||
* Activates the ADC1 driver and the temperature sensor.
|
||||
*/
|
||||
adcStart(&ADCD1, NULL);
|
||||
adcSTM32SetCCR(ADC_CCR_VBATEN | ADC_CCR_TSEN | ADC_CCR_VREFEN);
|
||||
|
|
|
@ -134,7 +134,7 @@ int main(void) {
|
|||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the ADC1 driver and the thermal sensor.
|
||||
* Activates the ADC1 driver and the temperature sensor.
|
||||
*/
|
||||
adcStart(&ADCD1, NULL);
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ int main(void) {
|
|||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the ADC1 driver and the thermal sensor.
|
||||
* Activates the ADC1 driver and the temperature sensor.
|
||||
*/
|
||||
adcStart(&ADCD1, NULL);
|
||||
// adcSTM32EnableTSVREFE();
|
||||
|
|
|
@ -135,7 +135,7 @@ int main(void) {
|
|||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the ADC1 driver and the thermal sensor.
|
||||
* Activates the ADC1 driver and the temperature sensor.
|
||||
*/
|
||||
adcStart(&ADCD1, NULL);
|
||||
adcSTM32EnableTSVREFE();
|
||||
|
|
|
@ -138,7 +138,7 @@ int main(void) {
|
|||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the ADC1 driver and the thermal sensor.
|
||||
* Activates the ADC1 driver and the temperature sensor.
|
||||
*/
|
||||
adcStart(&ADCD1, NULL);
|
||||
adcSTM32EnableTSVREFE();
|
||||
|
|
Loading…
Reference in New Issue