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 Pullup/pullDown activate

Other Parts Discussed in Thread: CC3200

Hello, I cant seem to activate pulldown/pullup internal resistor in an GPIO configured as input.

i tried both:

PinConfigSet(GPIO_REED,PIN_STRENGTH_4MA,PIN_TYPE_OD_PU);

and 

GPIO_IF_Set(GPIO_REED, g_uiREEDPort, g_ucREEDPin, 1);

and my configuration is :

MAP_PinTypeGPIO(PIN_61, PIN_MODE_0, false);
MAP_GPIODirModeSet(GPIOA0_BASE, 0x40, GPIO_DIR_MODE_IN);

any thoughts?

thank you

  • Dear Erez,

    Use the following statements to activate pull-up/pull-down resistor on an input Pin.

    // Activate internal pull-up resistor on PIN_61
    MAP_PinConfigSet(PIN_61, PIN_STRENGTH_4MA, PIN_TYPE_STD_PU);
    // Activate internal pull-down resistor on PIN_61
    MAP_PinConfigSet(PIN_61, PIN_STRENGTH_4MA, PIN_TYPE_STD_PD);

    Regards,

    Vaibhav

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    If my reply answers your question, please press the  Verify Answer   button below the answer to help other users find the correct answer easily.

  • Thank you, that did it.
    one thing, I don't understand the usage for the GPIO name indices (e.g. pin_61 is GPIO06)
    why is it in use anyway?
    it seem that we always use the pin number with the function "GPIO_IF_GetPortNPin()" for the GPIO port and pin number.
  • Yes,  CC3200 GPIO may be confusing in the beginning.

    erez posner said:
    it seem that we always use the pin number with the function "GPIO_IF_GetPortNPin()" for the GPIO port and pin number.

    No, we use GPIO number with the function GPIO_IF_GetPortNPin(). For example to get the GPIO Port and GPIO Pin for PIN_61 (GPIO06) we can use it as:

    unsigned int pin61_gpio_port=0;
    unsigned char pin61_gpio_pin=0;
    
    GPIO_IF_GetPortNPin(6, &pin61_gpio_port, &pin61_gpio_pin);

    Regards,

    Vaibhav

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    If my reply answers your question, please click the  Verify Answer   button below the answer to help other users find the correct answer easily.