Hi,
How could we to init the pin direction in pinmap_init() ?
does pin direction be related with low power ?
Hi @bingsong.li ,
Welcome to AmebaIoT Forum.
Based on your previous issue, I am assuming that you are using open-source AmebaD SDK .
There is a comment section above of the pinmap_init() indicating you need to set up the Pull Up or Pull Down direction in pmap_func :
Where the pin mapping function for PMC(Power Management Control) is located here
},
{ /* wakepin 3 */
_PA_15, /* PINMUX_S0 */
_PA_19, /* PINMUX_S1 */
_PA_26 /* PINMUX_S2 */
},
};
/* you should set dsleep_wevent_config.BIT_GPIO_WAKE_STS ON if you use wakepin */
/* can be used by sleep mode & deep sleep mode */
WAKEPIN_TypeDef sleep_wakepin_config[]=
{
// Module Status Polarity
{PINMUX_S0, OFF, 1}, /* wakeup_0 config */
{PINMUX_S0, OFF, 1}, /* wakeup_1 config */
{PINMUX_S0, OFF, 1}, /* wakeup_2 config */
{PINMUX_S0, OFF, 1}, /* wakeup_3 config */
{0xFFFFFFFF, OFF, 0}, /* Table end */
};
Thanks
Hi dakamaster,
Thank you very much for your response,
what the context you metioned I had saw before,
what my query is the gpio direction’s impact on low power.
But that’s okay. I found a docment related this, thgouht it’s a simple answer as below.
Sharing it as a reference.
Thanks again.
Hi @bingsong.li ,
Thanks for sharing. I will learn more about it!