Output for a LED must be on during the Connect State

4 posts / 0 new
Last post
cosianer
Offline
Last seen:4 years 5 months ago
加入:2015-05-19 09:11
Output for a LED must be on during the Connect State

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:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi cosianer,

Hi cosianer,

Please check the following post.

http://support.dialog-semiconductor.com/da14580-not-retaining-pin-state-...

Thanks MT_dialog

cosianer
Offline
Last seen:4 years 5 months ago
加入:2015-05-19 09:11
Hi 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

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi cosianer,

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