Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
1 Solution
bharadhwajas_91
Employee
Employee
First like received First like given

Hi,

   

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.

View solution in original post

0 Likes
2 Replies
bharadhwajas_91
Employee
Employee
First like received First like given

Hi,

   

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.

0 Likes
Anonymous
Not applicable

Thank you very much. Now I get the point.

0 Likes