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.

UART 2 RX receive problems in AM335x Linux.

Hi Forum,

I've a strange problem using the UART2 on a beaglebone using ti-sdk-am335x-evm-06.00.00.00.

The pin initialisation in board-am335xevm.c got changed. 

I added {uart2_init, DEV_ON_BASEBOARD, PROFILE_NONE}, in beaglebone_dev_cfg[]

I checked the states of the pin's and they seem to be correct.

root@am335x-evm:/sys/kernel/debug/omap_mux# cat spi0_sclk 
name: spi0_sclk.uart2_rxd (0x44e10950/0x950 = 0x0071), b NA, t NA 
mode: OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP | AM33XX_SLEWCTRL_SLOW 
signals: spi0_sclk | uart2_rxd | i2c2_sda | NA | NA | NA | NA | gpio0_2

root@am335x-evm:/sys/kernel/debug/omap_mux# cat spi0_d0 
name: spi0_d0.uart2_txd (0x44e10954/0x954 = 0x0059), b NA, t NA 
mode: OMAP_MUX_MODE1 | AM33XX_SLEWCTRL_SLOW 
signals: spi0_d0 | uart2_txd | i2c2_scl | NA | NA | NA | NA | gpio0_3

Now I can send messages via e.g.

   echo "hello world" > /dev/ttyO2

and this is received correctly at the RX side.

But when I try to receive messages sent to the beaglebone, then it becomes strange. There are only parts of the message received correctly. The rest is complete garbage. 

We tested all different baud rates and also different tools. I compiled minicom, I compiled a termios example and also did a cat < /dev/ttyO2 and all results in the same.

We narrowed the issue down to the fact, that the 2 first characters are always correct. The rest .... unusable. 

So we wonder what could cause this behaviour? Can the DMA (edma_req) or some timings or buffers cause this?

Any ideas or suggestions?

Thanks,

Florian

  • Hi Florian,
     
    Did you try to loopback the TX and RX externally (short pin 21 to pin 22 on header P9 of the Beaglebone)?
  • Hello,

    thx for your answer. Issue is solved. I forgot to mention that we did loop TX and RX and all looked fine. 

    We found out, that all of this was caused by different timings of the sender (Atmel Microcontroller) and the Beaglebone. 

    All of this is very strange. The dev. PC can receive correctly from both systems. (we use hterm)

    Sending from the Atmel to the Beaglebone works when using sligtly different baudrates!

    Because of robustness, we'll go for SPI I think.

    Thanks, F