I am using MSP430G2330 in a battery powered application, so has to be low powered & also all unsued I?O or peripherals should be off. I have made below settings, are these settings ok?
1. Vcc is powered by 3.3V.
2. Reset pin is pulled by 47K & decoupled by 2.2nF.
3. Clk pin is left floating.
4. Three I/O used:
A) P1.6 as output
P1OUT &= (uint8_t)(~REG8_BIT_6);
P1DIR |= REG8_BIT_6;
P1SEL &= (uint8_t)(~REG8_BIT_6);
B) P1.7 as output
P1OUT &= (uint8_t)(~REG8_BIT_7);
P1DIR |= REG8_BIT_7;
P1SEL &= (uint8_t)(~REG8_BIT_7);
C) P1.2 as analog in
ADC10AE0 |= REG8_BIT_2;
5. Unsued I/O on pinout = p1.5.
Datasheet of MCU says that P1.0, P1.1, P1.3, P1.4, P2.6, and P2.7 are in device but not on pinout so be properly terminated. So I made them as input pull down:
/* unused pin */ P1OUT &= (uint8_t)(~REG8_BIT_5); /* pin is pulled down */ P1DIR &= (uint8_t)(~REG8_BIT_5); /* pin is input */ P1SEL &= (uint8_t)(~REG8_BIT_5); P1OUT &= (uint8_t)(~(REG8_BIT_0 | REG8_BIT_1 | REG8_BIT_3 | REG8_BIT_4)); /* pin is pulled down */ P1DIR &= (uint8_t)(~(REG8_BIT_0 | REG8_BIT_1 | REG8_BIT_3 | REG8_BIT_4)); /* pin is input */ P1SEL &= (uint8_t)(~(REG8_BIT_0 | REG8_BIT_1 | REG8_BIT_3 | REG8_BIT_4)); P2OUT &= (uint8_t)(~(REG8_BIT_6 | REG8_BIT_7)); /* pin is pulled down */ P2DIR &= (uint8_t)(~(REG8_BIT_6 | REG8_BIT_7)); /* pin is input */ P2SEL &= (uint8_t)(~(REG8_BIT_6 | REG8_BIT_7));
6. Are all these settings ok? Is there any other peripherla which needs to be turn off or all peripherals are turn of by default?