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.

CC2530 -- GPIO behavior on reset

Other Parts Discussed in Thread: CC2530

Hello Team,

 

I am using a CC2530 and want to change the default behavior of the GPIO pins on a reset.  In the CC253x family user's guide, Chapter 5, it states "During reset, the I/O pins are configured as inputs with pullups (P1.0 and P1.1 are inputs, but do not have a pullup or pulldown)."

 

Question:

Can this default behavior be set to a configuration where the GPIO pins are set to input with NO pullup/down resistors?  Or at least a pulldown resistor configuration?

 

 

  • The default I/O pins are configured as inputs with pullups (P1.0 and P1.1 are inputs, but do not have a pullup or pulldown)." You can config them to pull down by changing P2INP after reset.

  • yes, of course you can do that.

    P0INP, P1INP and P2INP control the pull enable/disable (tri-state) of all the pins on port 0, 1 and 2.

    P2INP register bits 5:7 control instead the pull type for all the pins on that port (pull up/pull down).

    So basically you can set all pins in tri-state by setting '1' in P0INP, P1INP[2:7] and P2INP[0:4] (as mentioned P1.0 and P1.1 are in tri-state only mode) OR all to pull down by setting '0' in P0INP, P1INP[2:7] and P2INP[0:4] and '1' in P2INP register bits 5:7 (except obviously P1.0 and P1.1)

    Please check out Chapter 7 in http://www.ti.com/lit/pdf/swru191

    Thanks,

    TheDarkSide

  • Hello again,

     

    I am aware of the reset behavior and the standard method for changing pin configurations during operations but the question is, for the brief amount of time the device is held in reset, ex: RESET_N held low, the user's guide Chapter 5 says

     

    "The device has five reset sources. The following events generate a reset:

    • Forcing the RESET_N input pin low

    • A power-on reset condition

    • A brownout reset condition

    • Watchdog Timer reset condition

    • Clock-loss reset condition

    The initial conditions after a reset are as follows:

    • I/O pins are configured as inputs with pullups (P1.0 and P1.1 are inputs, but do not have a pullup or

    pulldown)"

    I want to know if these initial conditions can be changed because the current hardware design sees a large spike in current from the IO pins before the application code can set the pins.

    Regards,

  • If you are asking if it is possible to change the default settings of the IO pin based on the reset source, then no it is not possible.

    If a reset is generated (any type of reset as mentioned above), then the HW will set the pin state as input pullups (except for P1.0 and P1.1) and it is not possible to configure the HW in a different way.

    The first opportunity to change that is at program execution, ie RESET ISR, ie in SW.

    Thanks,

    TheDarkSide 

  • Hi TheDarkSide,

     

    This is exactly what I was asking about.  It is a HW change that can't be made.  Thank you.

     

    Regards,