This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IO port config - pin as an analog input pin


I 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 regards

[locked by: Sai (SWF) at 12:50 (GMT 0) on 2 Feb 2023]
  • 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.



  • The ADC conversion works fine both ways (ASEL = 1 or 0) - in other words, there doesn't seem to be any influence by ASEL.

Reply Children
  • Hi Christian,

    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.

    I hope it helps.