Use GPIO Analog for ADC read value on STM32H735
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 06:36 AM
Hello,
Is it possible to configure PA10 on STM32H735 as GPIO Analog and use it to read ADC Value ?
The AN4899, 4.3.4 Analog Configuration says :
Few STM32 GPIO pins can be configured in analog mode which allows the use of ADC, DAC, OPAMP, and COMP internal peripherals. To use a GPIO pin in analog mode, the following register are considered:
- GPIOx_MODER to select the mode (Input, Output, Alternate, Analog)
- GPIOx_ASCR to select the required function ADC, DAC, OPAMP, or COMP
However, I don't think there is the register GPIOx_ASCR in H7 and the reference manual, Figure 77 is not using PA10.
Solved! Go to Solution.
- Labels:
-
ADC
-
GPIO-EXTI
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 06:59 AM
Welcome, @Esaab.1​, to the community!
Well, you can find the available (alternative) functions of the individual GPIO in the data sheet. For PA10, only the following are given in Table 8, which does not contain any ADCx_INxx:
- TIM1_CH3
- LPUART1_RX
- USART1_RX(boot)
- OTG_HS_ID
- MDIOS_MDIO
- LCD_B4
- DCMI_D1/PSSI_D1
- LCD_B1
- EVENTOUT
PA10 cannot therefore be used as an ADC input.
Does it answer your question?
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 06:59 AM
Welcome, @Esaab.1​, to the community!
Well, you can find the available (alternative) functions of the individual GPIO in the data sheet. For PA10, only the following are given in Table 8, which does not contain any ADCx_INxx:
- TIM1_CH3
- LPUART1_RX
- USART1_RX(boot)
- OTG_HS_ID
- MDIOS_MDIO
- LCD_B4
- DCMI_D1/PSSI_D1
- LCD_B1
- EVENTOUT
PA10 cannot therefore be used as an ADC input.
Does it answer your question?
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 07:02 AM
Hello, thanks for your fast answer @Peter BENSCH​ .
So what is Gpio analog option in cubeMX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-02 12:16 AM
The GPIO analogue option is not to be confused with an ADC input, but in principle has two functions:
- Disconnecting the external pin from the digital function. This is useful, for example, to disconnect the Schmitt trigger present at the digital input from a floating input, because this can lead to high-frequency switching of this trigger with associated current consumption.
- Connecting any analogue peripherals (e.g. opamp, comparator, ADC) that may be present, but do not necessarily have to be in the respective case.
If the problem is solved, please mark this thread as answered by selecting Select as best, as also explained here. This will help other users find that answer faster.
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-09 11:53 PM
Hello @Peter BENSCH could you elaborate a little more on the first point you explained? For example, I need to read digital values ​​with ref voltage such as variable voltage (0.5- 0.7... 1.3v..) from the pin that does not have an ADC input.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-10 12:03 AM
For such tasks you need an external matching circuit, which can be realised e.g. with comparators whose comparison level is generated e.g. by a DAC (if the respective derivative has one).
