hello
i am using the dsps and having a problem with the EXT_SLEEP
when i enable the ext_sleep, the adv is unstable, which means that in the iphone app the rssi is very low and sometimes dissapears
without sleep it advertises constantly but when the uart data stream is coming to the rx the connection is lost.
1) is there an extensive sleep documentation? because what i have seen on the site is very general.
2)how can i set a gpio to wake the device from the sleep?
3)i read that there is a timer that wakes up the ble, what is it and where in the code can i find it?
tnx
Device:
Hi roinovi,
1) You can check UM-B-006 that is a general explanation how the system goes to sleep, also you can have a look at the section 7.1 of the UM-B-051 document for some extra info regarding the SDK5 and the sleep modes.
2) You will have to use the wake up timer, you can have a look to see how should be used in UM-B-051 in section 10.7.
3) The only timers that can wake up the BLE is the kernel timers, again in the UM-B-051 document in 5.6 section. For the kernel timers you can use the app_easy_timers API for setting and canceling the timers.
Thanks MT_dialog
is there a reason for the unstable adv while sleep is enabled?
Hi roinovi,
I can't see anything like that on the DSPS project, the advertising rssi is about -55 dBm to -64 dBm either using sleep or without it and i can't see how sleep can affect the rssi of the advertising, have you tried to read the rssi indication with a different application ?
Thanks MT_dialog
in q 2 i asked how to wake up the device using an external signal to a designated gpio, and you said to use a timer.
我不希望使用一个计时器,而是一位佤联军ke up pin that my attached micro will enable(1 high for example)
can it be done?
can i put the module to sleep using a gpio?
Hi roinovi,
Sorry about that, usually most users require a timer for the advertising procedure and sleep. Yes, you can wake up the 580 via an external interrupt, by using the wake up controller and a designated gpio. Just configure your pin that will take the interrupt, enable and register the interrupt in the user_on_init() function (use the wkupct_enable_irq() to enable and wkupct_register_callback() to register the callback of the external interrupt ), create the sleep callback function and issue an advertise stop in order to stop advertising and use the arch_ble_ext_wakeup_on in order to wake up from an external interrupt, additionally in the sleep callback you can register a different callback which will be called when you want to wake up.
Thanks MT_dialog