ADC pin configuration in STM32F072B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-30 5:36 AM
How to configure ADC pin in STM32F072B controller?
I do not give any input in ADC pin but I got the output?
Same configuration and code working correctly on STM32F072B Discovery Board.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-04 12:25 AM
Hello,
Schmidt triggers are disabled automatically once you configure IO line in analog mode.
Best Regards,
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-30 5:45 AM
Hello,
In case you are using STM32CubeMX tool:
If you would like to select IO pin as analog (to be used by ADC), please just select ADC channel. You can configure all not used pins automatically as analog using Project settings. The second option is used to reduce current consumption in the application as by default IOs are configured as input floating. In this configuration there is Schmit trigger active at the pin which is causing an additional current consumption. This component is disabled in analog mode.
In case you are writing code manually you should configure IO lines in analog mode (GPIOx_MODER register).
Best Regards,
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-30 6:38 AM
Thanks to the for the reply.
Yes, I am using STM32CubeMX tool.
I check analog pin configured is correct. but how to disabled Schmit trigger?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-30 6:45 AM
That does not mean too much.
What is the external wirings on both boards ?
Short the ADC input to ground, and you shall read zero. If the input floats, the S&H will pick up noise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-30 11:26 PM
Thanks to the for the reply.
Yes, I am using STM32CubeMX tool.
I check analog pin configured is correct. but how to disabled Schmit trigger?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-04 12:25 AM
Hello,
Schmidt triggers are disabled automatically once you configure IO line in analog mode.
Best Regards,
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-04 6:31 AM
Hello,
Thanks for the sharing the information.
