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.

Config UART 3 StarterWare



Hi,
I want to configure UART 3, (UART1, 2 e 4 are working) but UART 3 doesn't work.
Someone have some example to show me about this ?
Some code to show this function's:
-> UART3 Module ChkConfig()
-> UARTPinMuxSetup()
Thanks in advance.

  • Hi Matheus,

    Can you please specify the use case for the UART1, 2, 4 and trying on 3, and on which board?

    -Murali Krishna Dama

  • Hi Murali. Thanks for the answer.
    I'm using beaglebone black and starterware. I config successful other UARTs (1, 2, 4) but using the same logic to UART 3 do not work. I believe that the problem is in config the PinMux (tx and rx) and ModuleClock.

    Thanks in advance.

  • Matheus,

    Please post the code lines for UART3 PinMux and PRCM.

    Regards,
    Murali Krishna Dama

  • Hi Murali.
    This is the code:

    void UART3ModuleClkConfig(void) {
    /* Alternative UART3 clock setup */
    HWREG(SOC_CM_PER_REGS + CM_PER_UART3_CLKCTRL) |=
    CM_PER_UART3_CLKCTRL_MODULEMODE_ENABLE;

    /* Waiting for MODULEMODE field to reflect the written value. */
    while (CM_PER_UART3_CLKCTRL_MODULEMODE_ENABLE !=
    (HWREG(SOC_CM_PER_REGS + CM_PER_UART3_CLKCTRL) &
    CM_PER_UART3_CLKCTRL_MODULEMODE));
    }

    UartPinMuxSetup{
    /* RXD */
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_UART_RXD(3)) = 0x30;

    /* TXD */
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_ECAP0_IN_PWM0_OUT) = 0x11;
    }

    Thanks in advance.
  • Matheus,

     

    When i checked schematics of BeagleboneBlack, UART3 Istance is not used on this board.If you check UART1, 2, 4 TxD,RxD signals are allocated for the Pin Outs.

    If you take other boards like AM335x ICEv2, UART3 TxD, RxD are mapped to the pinouts.

    Matheus, see the following snapshot of beagleboneblack A6 , for UART4 pinouts.

     

    Regards,

    Murali Krishna

  • Hi Murali.
    Thanks for the answer.
    But, lets me explain better, I created my own board based on Beaglebone Black and and mapped TX and RX UART 3 to outputs pins.
    So now, I cant configure them using StarterWare.

    I'm sorry for the mess.

    Thanks in advance.

  • Matheus,
    If you are using CCS just observe the Base address of UART3 Instance and Its registers in "Memory Browser" of CCS-> view->Memory Browser
    If you are not able to see any of the registers with this simple check then it should be problem with Clocks.
    In case of pinmux if you are using the same pins with proper mode as per your custom board it should work proper.
    If both are good check rest of the aspects like interrupts etc.

    Regards,
    Murali Krishna Dama

  • Hi Murali.

    I configured successfully the pins the TX and RX to UART3, but now, when I try to enable the interrut for RX my code stops. Is the same functions that I use to configure others UART's.

    The functions is: UARTIntEnable(SOC_UART_3_REGS, (UART_INT_RHR_CTI));
    Someone have any idea about whats is happen ?
    Thanks in advance.