Other Parts Discussed in Thread: CC2540
Hello,
I'm using P0.1, P1.0, P1.1, P2.0 as output pins. I noticed that all these pins go to logic HIGH state just after power on. I checked on oscilloscope to confirm this. This is just momentary, just until I set the pins to LOW at the *end* of the function SimpleBLEPeripheral_Init():
SimpleBLEPeripheral_Init()
{
...........
// makes sure LEDs are off
HalLedSet( (HAL_LED_1 | HAL_LED_2), HAL_LED_MODE_OFF );
P0SEL = 0; // Configure Port 0 as GPIO
P1SEL = 0; // Configure Port 1 as GPIO
P2SEL = 0; // Configure Port 2 as GPIO
//kdp P0DIR = 0xFC; // Port 0 pins P0.0 and P0.1 as input (buttons), all others (P0.2-P0.7) as output
P0DIR = 0xFF; // (P0.0-P0.7) as output
P1DIR = 0xFF; // All port 1 pins (P1.0-P1.7) as output
P2DIR = 0x1F; // All port 1 pins (P2.0-P2.4) as output
//kdp P0 = 0x03; // All pins on port 0 to low except for P0.0 and P0.1 (buttons)
P0 = 0; // All pins on port 0 to low
P1 = 0; // All pins on port 1 to low
P2 = 0; // All pins on port 2 to low
}
Is the default state of all CC2540 PIO pins HIGH? Is there a way to keep them LOW at power ON?
Thanks for your time and best regards,
Kapil