Our device exhibits behavior we don't understand when entering PM2.
Once per second the CC2541 in our design wakes up with a sleep timer interrupt, transmits an advertisement on each of three channels, then goes into PM2. In some cases, it first communicates with a peripheral via I2C. We are using the radio in proprietary mode. We are not using the TI BLE stack.
When there is I2C communication before the advertisements, the CC2541 goes to sleep almost immediately after the final advertisement. In the picture, you can see the I2C traffic on D0/D1, the three peaks from the three advertisements. The analog trace is across a 10 ohm resistor out of a bench supply set at 3.00V.
When there is no I2C traffic, it takes 600 µsec to sleep after SLEEPCMD = 6 and PCON = 1. In the picture below, D2 and D3 are IOs that I'm toggling in code right before PCON = 1. The next 600 µsec is after the PCON = 1 statement and before the following statement (we use a NOP), the one executed after waking from PM2. D3 goes low just before the NOP.
The statement after PCON = 1 is not aligned on an address divisible by 4.
The CC2540-41 User's Guide simply says that "When PM1, PM2, or PM3 is entered, a power-down sequence is run."
Any ideas what could be causing the difference, or could be causing the CC2541 to take 600 µsec to power down after PCON is set to 1?
Thanks
Dan Lewis