Today I found a strange problem of CC2541' I/O
on one of my CC2541 prototype board,I have to try to P1_2 become output and output low level by following word：
P1SEL &= ~(1<<2); P1DIR |= (1<<2);
i have to try to step tracking the program，and i found when the program run to the P1_2 =0 ;
the program run unexpected
I change another board ，the program run well
i do not know what is the reason
Am I so bad luck……
Maybe you have a short on the failing board so that P1_2 is connected to VDD. In that case, it will work fine until you set P1_2 low, but then you will get a large current draw that could cause your supply to go below 2 V and the chip to go into brown-out reset.
Thank you for your reply，and i agree with you .
But this does not explain the problems I encountered.
my SCH is followed：
when the key was pressed，the net “ON” ’s level is high，It will lead to Vbat equal to Vcc
then system is starte ，and pull P1_2 to High by program。
the P1_1 was configed input and when P1_1 is High ,the key was pressed
When the double-click is detected ，pull P1_2 to low level ，then Vcc equal to gnd
But this is just the aim of my design, but actually is not so.
when the program run to the P1_2 =0, the program run unexpected.
But if I remove the diode "D100"，I manually pulled the “ON” net ，the program work well.
i do not know what is the reason，
If I understand the schematics correctly, setting P1_2 low will set the ON pin on TPS22929x low, causing the supply to the CC2541 to be disconnected. When you lose the power to the device, the debugger will stop working and may show wrong information (such as indicating that the device is running). Note that when the supply of CC2541 is removed (set to GND), no I/O pin on the CC2541 should be high, as that could cause current draw (in general, I/O should never be more than 0.3 V over the VDD pins of CC2541, see the absolute maximum ratings section of the data sheet). If you connect the debugger while disconnecting the supply, this could happen.
This mans that when testing power-off initiated from the CC2541, you need to run without a debugger.
You wrote that the program ran well on another board. Is this a prototype board of the same kind? If so, I would be surprised, as you should lose the debugger connection when you power down the chip.
thank you for you reply
on another board ，the diode was removed 。In I just sent the first post ，I have not found this problem with that diode
now on the two board，if remove the diode it work well
so i do not know what is the reason ，
Is my schematic unreasonable？
I am no HW expert, but I think the diode may give you a problem. When the CC2541 is powered down, the voltage will decay gradually (due to capacitance on the supply). When the BOD (brown-out detect) threshold (somewhat under 2.0 V) is reached, the chip goes into reset, and the I/O pins go to pull-up. This means that the ON pin goes high again since the diode isolates it from the pull-down. I think removing the diode (i.e. shorting it) should work. You may have to increase the pull-down a little (reduce the resistance) in that case to ensure ON is held low until the supply to the CC2541 has gone low. This will increase the current consumption slightly while the chip is on.
Have you considered if you even need the TPS22929x? The current consumption of CC2541 while in PM3 is very low, only 0.5 uA, which is not much more than the 0.2 uA of TPS22929x. If this is acceptable, you can go to PM3 when the system is off, and connect the power switch to an I/O in order to switch the circuit back on.
Have you probed P1_1 when the double click occurs to be sure that it is going low as you expect? If P1_1 is configured as an input with pull up enabled then it will still stay high even if Vbat is disconnected. Could this be why the program only works when you manually pull P1_2 low?
thank you for your reply
I measured Vcc and P1_2 with an oscilloscope
I do not see the VCC voltage has dropped, and the P12 does not go low level
Although I think your analysis looks very reasonable，
if I remove the diode， the KEY （i.e. P1_1）can not work properly，because P1_2 will pull P1_1 High,and the key is active when the P1_1 is High
The reason of I use the TPS22929 is the product we design is powered with battery and run BLE 1.2.1 。 we only wake up the MCU by sleep time not the external
interrupt ，and if CC2541 goes to PM3，it can only wake up by key or another external interrupt
And we measured the PM3‘s current ，it is hard to achieve to 0.5 μA so low
Thank you for your reply.
Because P1.0 and P1.1, which do not have pullup/pulldown capability.
so i add the pulldown Resistance R102
I have probed P1_1 、P1_2 and Vcc ,Everything looks normal, except P1_2 can not properly be pulled down
but if i remove the diode ，everything work well
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.