This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am having power consumption problems and I think it is because of the pin configuration. I have pins configured as output but when debugging, it appears that the input of those pins are set to high. Does this cause an increase in power consumption? How can I fix it?
Hi Iñigo Fernandez,
Setting the pins to output low should help reduce the power consumption.
Are you using the DriverLib library to set all of your ports? If so, there is a GPIO_setOutputLowOnPin function that can set all those pins to low. Otherwise you can set each of the pins to the output direction then low one at a time.
If you're using the CCS IDE you can use EnergyTrace to analyze the power, more information on EnergyTrace can be found in chapter 4 of the Code Composer Studio IDE Guide. This will allow us to see what peripherals are drawing power, and setting the MCU to low power mode when it is idling could be beneficial.
Regards,
Luke
Yes, I know. The thing is that the pins that I have configured as output low, then when I debug, they appear as output low and input high. Is this possible? Does this cause the power consumption to increase?
This is a symptom of a bus conflict (the two ends of the wire are driving different levels).Which pins are these? What are they connected to?
If you're using the Launchpad, and you're using P1.4/5 for something else, you should remove the TXD/RXD jumpers from J101 ("bridge header"). As far as that goes, maybe remove all the jumpers except for (J101) 3V3/GND/SBWTDIO/SBWTCK.
The pins are: 1.3, 1.5, 1.6, 1.7 and they are connected to different pins of an adapter board. I have already removed the TXD/RXD jumpers.
What is on the adapter board? Whatever that is appears (from your description) to be driving those wires opposite to how the MCU is.
If you disconnect the adapter board, does the symptom go away?
This is the internal circuit of the adapter board. If I disconnect the adapter board, the problem continues...
Hi Iñigo,
Have you found a solution to your problem? If not, can you post the code where you are initializing the pins?
Regards,
Luke
Hi Luke,
I have not found a solution.
This is the code where I am initializing the pins:
P1DIR|=0xFD;
P2DIR|=0xFF;
P3DIR|=0xFF;
P1SEL0 |= BIT4 | BIT6 | BIT7;
P1REN |= 0x02;
P2REN |= 0xFF;
P3REN |= 0xFF;
P1OUT|=0x02;
P2OUT&=0x00;
P3OUT&=0x00;
Regards,
Iñigo
**Attention** This is a public forum