2 Replies Latest reply on Apr 13, 2017 10:57 PM by szchc_2384006

    S6E2CCAJOA GPIO Config Question

      In 《FM4_S6E2CC_Lab1_Blinking.pdf》, there is a gpio config :


      bFM4_GPIO_ADE_AN08 = 0; // AN08 to GPIO (bit 08 set to zero)


      Then, I find the Macro in PDL s6e2cc.h:


      #define bFM4_GPIO_ADE_AN08                        *((volatile uint32_t*)(0x42DEA020UL))


      I am trying to know the meaning of the code(bFM4_GPIO_ADE_AN08 = 0;)。


      But,I can't find the corresponding register or any explanation about the address 0x42DEA020UL。


      Could you tell me where to find it?


      Thank you!

        • 1. Re: S6E2CCAJOA GPIO Config Question



          This ADE register lets you to set if a input pin should have the analog capability or not.So for AN0 to AN31 pins you need to set each bit corresponding to each pin in the order whether it is analog input or digital input/output because by default the value of ADE register is 0xFFFFFFFF which means Analog input. So when you want to use the pin as Digital input/output you need to reset the corresponding bit for the analog port.


          However the GPIO bit-band capability allows you set /reset each bit by writing to their corresponding bit-band register which is the line of code you have pointed out.

          • 2. Re: S6E2CCAJOA GPIO Config Question

            Thank you very much. Now I get the point.