Measure VDD stm32f4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-07 12:57 PM
Hello
Its not clear for me if is it possible to measure Vdd in stm32f407.
I read the manual but still not clear how to perform that.
I would be thankful if you show me an example if that possible.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-07 1:10 PM
Hello! Are you use STM32CubeMX to produce initialization code?
What IDE you use? (or need makefile?)
You can read VDDA, taking ADC measure from VREFINT and convert it to VDDA. VDD usually has same voltage with VDDA .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-07 4:19 PM
Hi again.
Take this IOC file and main.c also
it works with crystal 8 MHZ
In general , define at global scope
uint32_t VDDAmillivolts;
and after ADC initialisation call
HAL_ADC_Start(&hadc1);
// 0x1FFF7A2A is the address of VREFIN_CAL (look at Device datasheet DocID022152 Rev 7 Page 138) VDDAmillivolts=3300*(*((unsigned short*)0x1FFF7A2A));//VDDA = 3.3 V x VREFIN_CAL / VREFINT_DATA HAL_ADC_PollForConversion(&hadc1, 1000); VDDAmillivolts /=HAL_ADC_GetValue(&hadc1);now the VDDAmillivolts contains the VDDA in millivolts.
________________ Attachments : vrefint407.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyNu&d=%2Fa%2F0X0000000b97%2FzuXaXEJOYg2XqnuoRDyV78MlMg_rJu2ObFKdB8ZqlBc&asPdf=falsemain.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyWv&d=%2Fa%2F0X0000000b98%2Fy28LZjdzajRchq_9QME5XWpPXSkNIUaC.GSEABQz4.0&asPdf=false- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-08 6:23 AM
hey
FORTOUNAS.EVANGELOS
, I am getting a value of about 3 volts but what I expect to get is 3.3 volts. Is that normal?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-08 6:51 AM
This thread is almost one year old, pretty sure he won't answer.
I am getting a value of about 3 volts but what I expect to get is 3.3 volts. Is that normal?
You need to properly describe your measurement conditions.
But many ST evaluation boards (Discovery, Nucleo) have a shottky diode in the Vdd branch, reducing the 3.3V to about 3.0V.
