Hi MT_dialog,
I have the following problem: I want during the connect state of my server application an output at which an LED is connected permanently leave on, until the disonnect happens. At the moment it is so that the LED remains only on, when I make the connect during the phase of startup_sleep_delay (I have set this delay to 30 sec for testing). After this phase it flashes only once briefly, although I set it active at the very beginning of the app_connection_func function. Should I disable the Sleep Mode? Or whats going wrong? What can I do?
提前谢谢!
Device:
Hi cosianer,
Please check the following post.
http://support.dialog-semiconductor.com/da14580-not-retaining-pin-state-...
Thanks MT_dialog
Hi MT_dialog,
thank you for the link to the post. But I cannot solve my problem by my favorite way I wanted to do.
I would like to explain the problem again to you:
I want to set an output for an LED after the Connect. This output should remain static on until a disconnect happens. The Disconnect happens 1 to 2 sec. Later. To do this, I have set with
GPIO_SetActive the LED port in the function “app_connect_func. After the LED set, I have called the function “app_disable_sleep”. In the function “app_disconnect_func “ I have reset with GPIO_SetInactive the LED port. Result: the LED will flash on only briefly and does not remain static until Disconnect occurs.
I
n meantime I have solved the problem by this way: I start a kerneltimer with 5 ms during the Connect, which sets the LED port again and again: The LED looks like "on", but real it flashes with 5 ms. It’s not my favorite static "high" for LED output.
What is the correct procedure for my problem? Can I get a static "high level" for 2 seconds too?
Thanks in advance
Hi cosianer,
You have add an extra variable or check the device's state when waking up in the user_periph_setup.c in the periph_init() function. Every time the device sleeps tha padlatches will keep the state of your pin but when waking up your pins are re-configured to their default state. So you have to place a check in order to see if the device is connected to open the led.
Thansk MT_dialog