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.
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:
PA10 cannot therefore be used as an ADC input.
Does it answer your question?
Regards
/Peter
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:
PA10 cannot therefore be used as an ADC input.
Does it answer your question?
Regards
/Peter
2023-03-01 07:02 AM
Hello, thanks for your fast answer @Peter BENSCH .
So what is Gpio analog option in cubeMX?
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:
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
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.
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).