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.

AM335x EVM - Unable to edit FCR

Hello,

I have been working with the AM335x EVM and I noticed that some registers, FCR (FIFO Control register) in particular, is filled with asterisks and it does not allow me to edit it.

I am trying to use UART1 to be able to transmit/receive data between the EVM and a PC but I have not been successful.  I will appreciate any assistance or suggestions, thank you!

v/r

Hector Garcia

  • Hi Hector,

    UART FCR is a write-only register. If you read it you will read the
    contents of IIR register instead of the contents of FCR.

    To configure certain values of the register like TX FIFO trigger level you have to set the EFR register 4th bit.
    and to set the Rx FIFO trigger levels some bits in the SCR and TLR have to be set  depending on the requirement of having a granularity of 1 or 4.
    For more details refer the UART FIFO management section in the TRM.

    The UARTFIFOConfig API does the necessary FIFO configuration for you.
    Refer the uartEcho example from the latest starterware release 02.00.01.01 for its usage.

    For enabling UART1 instance you have to enable clocks and PinMux settings for the particular instance.

     Refer the code for clock and pin mux settings for UART0 instance defined in platform/evmAM335x/uart.c and do the corresponding changes
     for the required instance.

    Hope this helps you.

    Thanks & Regards

    Anant Pai

  • Anat Pai,

    Thank you  for your response!

    It makes sense why I was not able to edit the FCR!

    I was aware of the UARTFIFOConfig API and I studied its behavior in order to use the receive/transmit FIFOs.  However, I also enabled auto CTS/RTS to control data flow at the hardware level but it did not work as expected.  Looking at the schematics, we noticed that the RTSn, CTSn, RXD, TXD for UART1 seem not to be physically connected to anything (see attachment).

    We are planning to modify the EVM by physically connecting these lines.  

    Are there any other ways to enable these lines without physically modifying them?

    Thank you!

    v/r

    Hector Garcia6102.Expansion Connector -EXP2.pdf

  • Hi Hector,

    You can try to use the UART0 instance which is pinned out and is brought out using a DB-9 connector.

    To use the UART1 instance you have to bring out the pins through the expansion header by connecting wires to it.

    I am not aware of any other way in which you can avoid physically modifying it.

    The software will only enable you to perform pinmux,clockConfig and other configuration settings on the UART1 instance.

    Thanks & Regards

    Anant Pai

  •  

    Hello Anat Pai,

    We decided to abandon the modification of the EVM because we believe it would take too much time! However, we have decided to use UART2 instead!

    Our project requires the use of at least 2 ports, UART0 and UART2, respectively.  UART0 is working properly but my new issue is getting UART2 to work.

    I was able to use clockConfig to get the clock working for UART2. Now, the pinmuxing seems to be what is holding us back.  Below are the signals (RXD, TXD, CTSN, and RTSN) that I am using to get UART2  to work (hopefully). 

     

    /* SCLK/RXD */

    HWREG(SOC_CONTROL_REGS + (0x950)) =

    (CONTROL_CONF_SPI0_SCLK_CONF_SPI0_SCLK_PUTYPESEL |

    CONTROL_CONF_SPI0_SCLK_CONF_SPI0_SCLK_RXACTIVE);

     

    HWREG(SOC_CONTROL_REGS + (0x954)) =

    (CONTROL_CONF_SPI0_D0_CONF_SPI0_D0_PUTYPESEL);

    /* DATA8/CTSN */

    HWREG(SOC_CONTROL_REGS + (0x08C0)) =

    (CONTROL_CONF_LCD_DATA8_CONF_LCD_DATA8_PUTYPESEL |

    CONTROL_CONF_LCD_DATA8_CONF_LCD_DATA8_RXACTIVE |

    CONTROL_CONF_LCD_DATA8_CONF_LCD_DATA8_PUDEN);

    /* DATA9/RTSN */

    HWREG(SOC_CONTROL_REGS + (0x08C4)) =

    (CONTROL_CONF_LCD_DATA9_CONF_LCD_DATA9_PUTYPESEL);

     

    Please, let me know if the above configuration will work or point me to the right direction so that I can get UART2 working.

    I really appreciate your assistance, THANK YOU!

    v/r

    Hector Garcia

  • Hi Hector,

    You are missing setting the muxmode since these pins are not brought out by default for UART2 instance.

    I have slightly modified your register settings hope this helps you to use UART2 correctly.

    /* SCLK/RXD */

    HWREG(SOC_CONTROL_REGS + (0x950)) =

    (CONTROL_CONF_SPI0_SCLK_CONF_SPI0_SCLK_PUTYPESEL |

    CONTROL_CONF_SPI0_SCLK_CONF_SPI0_SCLK_RXACTIVE | CONTROL_CONF_MUXMODE(1) );

     /*TXD*/  HWREG(SOC_CONTROL_REGS + (0x954)) =

    (CONTROL_CONF_SPI0_D0_CONF_SPI0_D0_PUTYPESEL | CONTROL_CONF_MUXMODE(1) );

    You can do the same changes for RTS and CTS as well.

    For more details refer platform code for I2C pinMuxing  and the TRM.

    For RTS and CTS you are using LCDDataA8 and DataA9 as these pins are connected to LCD,  you can instead make use of I2C0_SCL and I2C0_SDA pins where these UART(RTS and CTS)  pins can be used in mux-mode 3.

    Regards

    Anant Pai

  •  

    Thank you Anat Pai for your prompt response!

    I will go ahead an make the changes.  Now, if I decide to use  I2C0_SCL and I2C0_SDA  pins will I need to change CONTROL_CONF_MUXMODE(1) to CONTROL_CONF_MUXMODE(3)?

    Thank you!

    v/r

    Hector Garcia