cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-1 Wakeup from Sleep

Gasson.Gary
Associate II

Hi,

In my application I put the BlueNRG-1 unit into deepsleep with NO_Timer activated and it can only be awoken by IO12. When the unit is awaken by IO12 I check the wakesource and I confirm it was IO12 that has awaken the chip. Right after this I need to do a BLE scan by using the following instruction

result = aci_gap_start_general_discovery_proc(625, 625, PUBLIC_ADDR, 0x01);

The result code returned is 0x46 which indicates

/**
 * @brief The requested operation cannot be performed by the Host in the current status.
 */
#define BLE_STATUS_NOT_ALLOWED              ((tBleStatus)(0x46))

I am not sure why it is not allowed ?

The strange this is that this only happens when the unit has been awaken from DeepSleep. If I run the system normal I don't get this error

AND

When my program runs the first time I do a scan as indicated above and it works 100% and then I go into a Deepsleep awaiting to be awoken by IO12.

What am I missing?

What do I need to do when I have been awoken from sleep?

Please help as I have sitting with this problem for sometime now.

1 ACCEPTED SOLUTION

Accepted Solutions
Gasson.Gary
Associate II

Okay, I have found my problem. :astonished_face:

When I am woken from sleep I first need to run the BTLE_StackTick(); before I execute my usertick().

View solution in original post

1 REPLY 1
Gasson.Gary
Associate II

Okay, I have found my problem. :astonished_face:

When I am woken from sleep I first need to run the BTLE_StackTick(); before I execute my usertick().