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: keep GPIO status in LPDS mode

Part Number: CC3200

I would like to set a GPIO pull to a changeable value in LPDS mode. It could be Pull Up or Pull Down according to my internal state.

The struct cc32xx_io_park[] allows setting GPIO pull to a single value.

How to change this value before going LPDS mode?

  • Hi Trung,

    Please use the PRCMHibernateWakeUpGPIOSelect to select different trigger_type.

    Br,
    Kobi
  • or PRCMLPDSWakeupSourceEnable if you want to configure LPDS.

    Br,
    Kobi
  • I have no issue with LPDS wakeup.

    I have an output GPIO and i want to set that GPIO during LPDS mode

  • You can update the cc32xx_io_park[] and call cc_io_park_safe()
    e.g. cc_io_park_safe(cc32xx_io_park, sizeof(cc32xx_io_park)/sizeof(struct soc_io_park));

    or you can update the specific PIN configuration using following example method (pin_num and park_value are the similar to the definition from cc32xx_io_park[]):


    void apply_io_park(u8 pin_num, enum io_park_state park_value)
    {
    u32 pin_strength, pin_type;

    if(DONT_CARE != park_value) {
    /* Change the pin mode to GPIO to be safe */
    //MAP_PinModeSet(pin_num, PIN_MODE_0);

    /* First apply PullUp/PullDn (or no pull) according
    to the default levels specified in the user supplied
    parking table */
    MAP_PinConfigGet(pin_num, &pin_strength, &pin_type);

    if(NO_PULL_HIZ != park_value) {
    MAP_PinConfigSet(pin_num, pin_strength, park_value);
    } else {
    MAP_PinConfigSet(pin_num, pin_strength, PIN_TYPE_STD);
    }

    /* One by one HiZ all the IOs,
    by writing the register that drives IOEN_N control
    pin of the IOs. This register and the signal path is
    always-on and hence not get lost during True-LPDS */
    MAP_PinDirModeSet(pin_num, PIN_DIR_MODE_IN);

    /* Once all the digital IOs has been made HiZ,
    the desired default PAD levels would be held by
    the weak-pulls. Input buffers would be alive
    (such as auto-SPI or wake-GPIOs) and would not
    have Iddq issue since pulls are present. */
    }
    return;
    }