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.

TM4C123BH6PM: TM4C123BH6PM

Part Number: TM4C123BH6PM

Hi

I am using the tm4c123bh6pm and in one point it enters into hibernate 

portc pin5 is used as UART tx 

from some reason in hibernate this pin (portc pin5) turning to 3 state 

all other GPIO outputs are retaining there last state only this bit is changing to 3 state

I tried to change this pin to GPIO output before entering hibernate didn't help

thanks

Zahiz

  • Hi,
    Are you in VDD3ON mode to retain the IO states? If you are in VDD3ON mode then all outputs driven high are supposed to remain driven. What was the state of PC5 before entering hibernate and what voltage were you measuring while in hibernation? Can you disconnect PC5 pin from your UART device and confirm that it is floating in hibernate mode?
  • Hi
    the pin is configured to be TX of uart1
    during the configure I am using UARTFlowControlSet(UART1_BASE ,0X00004000|0X00008000);
    if I remove this command the pin retention is working and the pin stay in High position during hibernate.
    when using this flowcontrol command the pin is 3 state during hibernate how can I undo this flowcontrol before hibernation

    thanks
    Zahiz
  • The TX and CTS shares the same pin.  When in flow control mode the CTS is an input to the MCU. Is the MCU the DTE or the DCE?

  • Hi
    OK is it possible before entering hibernate to change this pin to GPIO output
    I tried to use
    GPIOPinTypeGpioOutput
    then
    GPIOPadConfigSet
    the
    GPIOPinWrite
    but it didn't help
    it stay in input state

    thanks
    Zahiz
  • Hi,
    I think somehow when you are in flow control mode it overrides to be in input mode. However, it should be no different than other pins for which you configured to be in inputs mode, these pins will just remain in input mode prior and during hibernation mode. How are you using the UART1? Do you need flow control at all?
  • Hi
    Thanks for the prompt replay
    it is working ok all the time exapt the fact that during hibernate I need it not to be input or 3 state
    is it possible to exit from this flow control before entering hibernate and then on exit to renter flow control
    if so what command should I use to stop the flow control

    thanks
    Zahiz
  • Can you try UARTFlowControlSet(UART1_BASE ,UART_FLOWCONTROL_NONE) prior to entering hibernation mode?
  • Hi
    Sorry it didn't help
    I tried changing the mode using UART_FLOWCONTROL_NONE (0X00000000)
    didn't have any effect
    when I remove the flaw control command in Hibernate it retain the port state (in my case TX "1")
    if I use flow control command even with the FLOWCONTROL_NONE in hibernate it is 3 state or input

    thanks
    Zahiz
  • What about changing to UART_FLOWCONTROL_NONE and then followed with the pin configured for output like what you did earlier.
  • Hi
    I did try that
    this didn't work in hibernate portc pin6 is 3 state

    --------------------------------------------------------------------------------------------------
    GPIOPinConfigure(GPIO_PC4_U1RX);
    GPIOPinConfigure(GPIO_PC5_U1TX);
    GPIOPinConfigure(HCI_PIN_CONFIGURE_UART_RTS);
    GPIOPinConfigure(HCI_PIN_CONFIGURE_UART_CTS);

    GPIOPinTypeUART(HCI_UART_GPIO_BASE, HCI_UART_PIN_RX | HCI_UART_PIN_TX);
    GPIOPinTypeUART(HCI_UART_RTS_GPIO_BASE, HCI_UART_PIN_RTS);
    GPIOPinTypeUART(HCI_UART_CTS_GPIO_BASE, HCI_UART_PIN_CTS);
    int i=0;
    while(i<1000000)
    {
    i++;
    }

    UARTFlowControlSet(UART1_BASE, 0x00000000);

    i=0;
    while(i<1000000)
    {
    i++;
    }
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE,GPIO_PIN_5);
    ROM_GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_5, GPIO_PIN_5);
    testHibernate();
    -------------------------------------------------------------------------------------------------------------

    this version same without the UARTFlowControlSet in hibernate portc pin 6 is "1"
    ---------------------------------------------------------------------------------------------------------------------
    GPIOPinConfigure(GPIO_PC4_U1RX);
    GPIOPinConfigure(GPIO_PC5_U1TX);
    GPIOPinConfigure(HCI_PIN_CONFIGURE_UART_RTS);
    GPIOPinConfigure(HCI_PIN_CONFIGURE_UART_CTS);

    GPIOPinTypeUART(HCI_UART_GPIO_BASE, HCI_UART_PIN_RX | HCI_UART_PIN_TX);
    GPIOPinTypeUART(HCI_UART_RTS_GPIO_BASE, HCI_UART_PIN_RTS);
    GPIOPinTypeUART(HCI_UART_CTS_GPIO_BASE, HCI_UART_PIN_CTS);
    int i=0;
    while(i<1000000)
    {
    i++;
    }

    // UARTFlowControlSet(UART1_BASE, 0x00000000);

    i=0;
    while(i<1000000)
    {
    i++;
    }

    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE,GPIO_PIN_5);
    ROM_GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_5, GPIO_PIN_5);
    testHibernate();
    ---------------------------------------------------------------------------------------------------------------------------------------------
  • Hi
    I even tried changing the UART Flowcontrol with
    HWREG(0X4000D030)=0X0;
    OR
    HWREG(0X4000D030)=0X300;
    in all cases in hibernate portc pin 5 is in 3 state
    only if I remove those commands the port is "1"

    Zahiz
  • Hi,
    Can you try below before you change the pin to output pin?
    1. Can you call UARTFlowControlGet() to see if the flow control is truly disabled?
    2. Can you disable UART by calling UARTDisable()?
    3. Can you try SysCtlPeripheralDisable(SYSCTL_PERIPH_UART1)?