cancel
Showing results for 
Search instead for 
Did you mean: 

Details Required for STM32W108 ADC External Voltage Reference

ron239955_stm1_st
Associate II
Posted on March 09, 2015 at 19:05

We are working on a commercial project making use of some STM32W108 modules, using the old HAL library (Not CMSIS) with Contiki.

The ADC needs to be configured to use an external voltage reference. The STM32W108 data sheet says:

''The ADC voltage reference (VREF), may be internally generated or externally sourced from

PB0.To use an external reference, an ST system function must be called after reset and after waking from deep sleep. PB0 must also be configured in analog mode using GPIO_PBCFGH[3:0]. See the STM32W108 HAL documentation for more information on the system functions required to use an external reference.''

We don't seem to be able to find the appropriate HAL documentation with this information (unclear if it is available with the advent of the newer CMSIS compatible standard peripheral libraries).  Be hugely grateful if somebody could provide the relevant information about the system function that must be called.   Best Wishes, Ron

 

#stm32w108-adc
1 REPLY 1
Posted on March 09, 2015 at 20:01

So what date(s) are we looking for? The SPL/CMSIS has been present since 2012.

The HAL from 2010 only seems to want to see ADC_REF_INT, not ADC_REF_AREF or ADC_REF_AVCC. It's conceivable you'd have to add some code, based on your understanding of the board/processor for other choices to work.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..