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.

CC3200: Using PIN 45 as GPIO 31?

Other Parts Discussed in Thread: ENERGIA, CC3200

We are having some trouble configuring pin 45 as GPIO input (Should be GPIO_31). It is usable in the online pinmux tool but doesn't seem to work.

Should it? We are using example code from the SDK to test it. We also tried reading it with Energia and using Cesanta's Mongoose-IoT. Neither seems to work.

  • Hi Kiril,

    I expect that there is some issue with GPIO_31. For example settings for GPIO_31 is not available in standard version of PinMux utility.

    I found this in CC3200 datasheet:

    Jan

  • Alas, we are using a module which hides this bug under its can. Thanks!
  • Actually, it turns out our module has VDD_ANA2 wired to VCC. So there must be something else.
  • Kiril,

    I was looking into this problem, and was able to use GPIO pin 45 as a digital input using Energia, with a CC3200 Launchpad. One thing to note is that the name for the pin in Energia follows this picture: 

    energia.nu/.../LaunchPads-CC3200-—-Pins-Maps-12-28.jpeg

    With this said, the pin is 17 and i used the following code to blink the green led if it detects that Pin is low:

    /*
     Input Pullup Serial
     
     This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a 
     digital input on pin 5 and prints the results to the serial monitor.
     
     The circuit: 
     * Momentary switch attached from pin 5 to ground 
     * Built-in LED on pin 14
     
     Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal 
     resistor is pulled to 3.3V. This configuration causes the input to 
     read HIGH when the switch is open, and LOW when it is closed. 
     
     created 14 March 2012
     by Scott Fitzgerald
     modified 27 Apr 2012
     Robert Wessels
     
     www.arduino.cc/.../InputPullupSerial
     
     This example code is in the public domain
     
     */
    
    void setup(){
      //start serial connection
      Serial.begin(9600);
      //configure pin 5 as an input and enable the internal pull-up resistor
      pinMode(17, INPUT_PULLUP);
      pinMode(GREEN_LED, OUTPUT); 
    
    }
    
    void loop(){
      //read the pushbutton value into a variable
      int sensorVal = digitalRead(17);
      //print out the value of the pushbutton
      Serial.println(sensorVal);
      
      // Keep in mind the pullup means the pushbutton's
      // logic is inverted. It goes HIGH when it's open,
      // and LOW when it's pressed. Turn on pin 13 when the 
      // button's pressed, and off when it's not:
      if (sensorVal == HIGH) {
        digitalWrite(GREEN_LED, HIGH);
      } 
      else {
        digitalWrite(GREEN_LED, LOW);
      }
    }
    
    
    

    Let me know if this helps you test the pin!

  • Yep, that's exactly what we tried, and GPIO_31 always reads as HIGH, be it INPUT or INPUT_PULLUP.

  • Hi, we are having the same issue... we are unable to set GPIO31 to an output using either the pinmux tool or manual configuration. Any update on configuring this pin? Our design has pin 47 shorted to VBATT and pin 46 not connected.
    Thanks,
    Dave