We have a curious problem with a CC2540-based product.
We normally read an RSSI of -74dBm at a distance of about 3m in a particular orientation, and there are many FCS errors. The low power is unexpected. While attempting to debug the problem, we set a couple of breakpoints in the CC2540 code. If we briefly stop at these breakpoints, the device functions as expected! - RSSI jumps to -30dB, we have no problems seeing the device or making a connection to it.
The breakpoints were in some code which set the CC2540 transmit power to +4dBm. Since the default is 0dBm anyway, we experimentally commented out the code which sets the transmit power. If we stop at the breakpoints, the RSSI is about -34dBm, and everything works. If we don't stop at the breakpoints, the RSSI is about -77dBm and our product doesn't work.
Another, similar firmware for the same product doesn't exhibit this problem. We've tried delaying in the firmware around where the breakpoints would normally be set, but this does nothing. Does this ring any bells for anyone?