HiI am using Renesas RA6M4 with FSP lib (fsp-3.8.0) and having ADC up and running properly in ADC_MODE_SINGLE_SCAN with ADC_TRIGGER_SOFTWARE.My question is - why is an ADC conversion working fine when having according IO pin in reset/default configuration (PSEL[4:0] 00000b -> (value after reset Hi-Z).
Although IO pin config with
IOPORT_CFG_ANALOG_ENABLE = 0x00008000, ///< Enables pin to operate as an analog pin
for the pin has never been called - ADC is working properly.I am confused why ASEL bit does not need to be set to operate properly as an analog input pin.Do I have to set ASEL bit to 1 to comply with specifications.Hope you can help me with this issue.Best regardsChristian
Hi Christian,
Thanks for reaching out to Renesas Engineering Community.
As stated in section 19.5.4 of User's Manual, ASEL bit should be set to 1 to use an analog input pin.
If I configure P504 as analog pin as below, I read P504PFS register, where ASEL is set to 1 as expected:
Please note that if ASEL is set to 1, the pin state (PIDR) cannot be read at this point.
Could you make sure that the analog pin is properly configured on FSP configurations ?
I hope it helps.
Regards,
AZ
Hi,thanks for answering that fast.I think everything you wrote seems clear to me - BUT:I am still confused why ASEL bit for according pin does not need to be set to operate properly as an analog input pin in ADC_MODE_SINGLE_SCAN...Many thanks for your remarks and support.RegardsChristian
when I look at the circuit, ASEL has no influence on the analog path, only on the digital one
The ADC conversion works fine both ways (ASEL = 1 or 0) - in other words, there doesn't seem to be any influence by ASEL.
It is my understanding that setting ASEL bit to 1 will result to the following settings:
If someone changes this settings manually through PmnPFS register, as I understand you do, the result will be the same and the analog pin will operate in the same way.
The ASEL bit does not affect the functionality of ADC, only the pin configuration.