Hello,
I am using a CC2541 with version 1.4 of the stack in SPI network processor mode with power savings enabled. I am using the HostTestRelease project CC2541SPI build configuration with near minimal modifications other than adding the GATT_DB_OFF_CHIP and SPI slave mode preprocessor configurations. The SPI slave configurations may have already been selected. The power source is derived directly from the battery with additional capacitance without an external DC/DC converter.
We've been seeing problems with the CC2541 draining batteries excessively when they should not be. We've narrowed it down to the point where it looks like if we do SPI transactions during a point of activity such as a advertising or connection event, the CC2541 does not return to low power mode as it should.
Below is the easiest example which I can replicate over of a period of about 10 minutes, but I am sure they may be other cases which cause a similar issue. In this example, I am making the device discoverable then ending discovery a couple seconds later (the time varies slightly).
I first do the standard initialization of the device and GAP and then run a cycle of enabling and disabling advertising. Each cycle, whether the CC2541 fails to enter low power mode or not, results in the exact same SPI transactions below:
- Send GAP Make Discoverable (0xfe06) with connectable undirected advertisements on all channels, a public address, and allowing scan requests from anybody.
- In hex: fe.0e.01.06.fe.0a.00.00.00.00.00.00.00.00.07.00.fa
- Receive a Command Status (0x067f) of success for opcode 0xfe06
- In hex: 00.fe.09.04.ff.06.7f.06.00.06.fe.00.75
- Receive a GAP Make Discoverable Done (0x0603) with a success status
- In hex: 00.fe.08.04.ff.05.03.06.00.0c.00.ff
- A few seconds later send a GAP end discoverable (0x0604)
- In hex: fe.04.01.08.fe.00.f3
- Receive a Command Status (0x067f) of success for opcode 0xfe08
- In hex: 00.fe.09.04.ff.06.7f.06.00.08.fe.00.7b
- Receive a GAP End Discoverable Done (0x0604) with a success status
- In hex: 00.fe.06.04.ff.03.04.06.00.fc
In these scope traces, you can see the normal operation. Channel 1 is the CC2541 current and the 3 SPI transactions in the zoom are the GAP End Discoverable command and responses as notated above.
Then about once every 10 minutes, at random occurance, we see an event like below where the CC2541 does not go to sleep. Every time this occurs, the SPI transaction occurs almost exactly where one would expect the next advertising event (100ms interval).
Because the SPI transactions are always the same, the network processor has no way of knowing this even occurred. To us, this indicates there is a problem with the either the power savings, SPI driver, or BLE stack on the CC2541.
Could you help us resolve this issue as it is a definite show-stopper for our product?
Thanks,
Nathan