Hi all.
14580_01,
I used this function in a project,then I want to know this can achieve.
Use P06 As input GPIO,Check Poweron button push;Then if this High Level Electricity last 10 second, used P06 as output GPIO,output High Level Electricity for Transistor to complete broad Power on. Can achieve this function?
code :
/******************in void set_pad_functions(void) ***/
GPIO_ConfigurePin( GPIO_PORT_0, GPIO_PIN_6, INPUT, PID_GPIO, false );
************************end void set_pad_functions(void) ***/******/
/*********************in main()()*********/
if(button_count<4){
if(GPIO_GetPinStatus(GPIO_PORT_0, GPIO_PIN_6))
button_count++;
else
button_count=0;
if(button_count==4)
{
GPIO_ConfigurePin (GPIO_PORT_0 GPIO_PIN_6,输出, PID_GPIO, true);
GPIO_SetActive( GPIO_PORT_0, GPIO_PIN_6 );
}
/****************end in main()**/
I am in testing Now
I test it,but now cannot achieve this function。please help me!
Hello huangliangy,
try setting the
button_count=0;
inside theif(button_count==4)
statement. Take the emptyelse
awayThanks VesaN,But is not solve this problem。 But I Discoveried GPIO's high or low Electricity Level is change by Sleep and Advertiing change,is this right?
Hi ,all:
Use P06 As input GPIO,Check Poweron button push;Then if this High Level Electricity last 10 second, used P06 as output GPIO,output High Level Electricity for Transistor to complete broad Power on.
Not achieve this function,Please help ,help please!
Now I change this project.it need Power on ,P06 LOW delay to High ,in
set_pad_functions
I set
GPIO_ConfigurePin (GPIO_PORT_0 GPIO_PIN_6,输出, PID_GPIO, false );
at while(1) In main_func ,
I add this
if(button_count<4){
button_count++;
if(4==button_count)
GPIO_SetActive( GPIO_PORT_0, GPIO_PIN_6 );
}
sleep mode is
/*Sleep modes*/
define CFG_EXT_SLEEP
#undef CFG_DEEP_SLEEP
the P06 high is not output,Why?
I am a fresh,Can you help me?
well ... I am doing nearly the same thing but i am changing the input/output faster (each around 10 micro seconds) ? did you make this work ?
I get it.the IO pin should be set high.
thank you for all help.