• Resolved

Linux/AM5728: PRU UART issues

Part Number: AM5728

Tool/software: Linux

Hi,all

I am developing PRU UART communication with another externel device on AM5728 industrial development kit,but I have some problems.

(1)When I coding my pru program,there are different bwtween PRU include file and  AM572x sitara processors technical reference manual.In AM572X_TRM the PRUSS_UART register PRUSS_UART_RBR_THR_REGISTERS should have one valid address field DATA[7:0].It have both read and write function so I should read and write data in same address.And in

ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05/example-applications/pru-icss-5.1.0/include/am572x_2_0/pru_uart.h,there have not the PRUSS_UART_RBR_THR_REGISTERS,oppositely,there is a PRU_UART_RBR_TBR register and it have two valid adderss fields RBR_DATA[7:0] and TBR_DATA[17:8].When I debug my code using CCS,there is only one valid adderss filed DATA[7:0] of PRUSS_UART_RBR_THR_REGISTERS in register debug window.

So what did I do wrong? why are they different?

(2)According to the AM572X IDK EVM Hardware User's Guide,there have AM57XX_PR1_UART0_TXD and AM57XX_PRU1_UART0_RXD signal on the expansion connector-J21 #45 pin and #47 pin.When I connect these two pin to another device tx and rx pin  respectively and run my pru program,I can write data from pru regularly but I can  not read any data.So I use oscilloscope to analy the error.The electrical level change between 0 and 3.3V regularly when I write data from PRU.But when I read data the electrical level is pulled up and changed between 2V and 3.3V.I also find out AM57XX_PRU1_UART0_RXD have signal same as TXD but lag when I write data from PRU to another device.I think I use wrong configuration on pinmux and I edit ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05/board-support/u-boot-2016.05+gitAUTOINC+6c5519b6fc-g6c5519b6fc/board/ti/am57xx/mux_data.h,

const struct pad_conf_entry core_padconf_array_essential_am572x_idk[] = {

...

-{VIN2A_D0, (M11 | PIN_INPUT)}, /* vin2a_d0.pr1_uart0_rxd */
-{VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */

+{VIN2A_D0, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d0.pr1_uart0_rxd */
+{VIN2A_D1, (M11 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d1.pr1_uart0_txd */

...

}

and also try 

const struct pad_conf_entry core_padconf_array_essential_am572x_idk[] = {

...

-{VIN2A_D0, (M11 | PIN_INPUT)}, /* vin2a_d0.pr1_uart0_rxd */
-{VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */

+{VIN2A_D0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_d0.pr1_uart0_rxd */
+{VIN2A_D1, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_d1.pr1_uart0_txd */

...

}

and recompile u-boot.Using compiled u-boot.img and MLO to boot system,but nothing change.

So why cause this situation,what configuration  I didn't do ?

(3)I create sdcard using create-sdcard.sh in ti-processor-sdk-linux-rt-am57xx-evm-03.02.00.05/bin,and when I insert sdcard and boot the board the kernel hangs.There is some boot message in attach file.I also recompile kernel and u-boot but nothing change.

So I don't know what go wrong.

Please help me.

Thank you.

boot_message.doc

  • The software team have been notified. They will respond here.

     

    Best Regards
    Biser
  • In reply to Biser Gatchev-XID:

    Alex,

    I would follow whatever the TRM says about the register definitions for question 1. I am trying to verify why the include files do not match the TRM definitions and once I find out, the mismatch will be corrected.

    I have asked a colleague about question 2 and will respond here once I hear more.

    On question 3, it seems like there may be an issue with your SD card that you are using. Can you try a new (mayber higher speed) SD card and see if the problem persists? I have attached my successful dmesg output for comparison.

    Jason Reeder

    /cfs-file/__key/communityserver-discussions-components-files/791/4834.dmesg.txt

  • In reply to Jason Reeder:

    Hi,Jason,

    Thank you for your reply.

    I tried to use another new SD card,but it didn't work.I also tried different computer and different OS windows to create SD card,but it still didn't work.

    And when I created SD card image using cteate-sdcard.sh of AM437X,it worked on my AM437X IDK.

    Best Regards

    Alex

  • In reply to Alex2020:

    Hi Alex,

    For question 2, can you describe your hardware setup in more detail?  What is the other device tx and rx pins you're connecting to?  Is this another AM572x UART TXD and RXD pin on the same IDK?  If so, which pins?  Or are you connecting to the AM57XX_PR1_UART0_TXD  /  RXD pins on a 2nd IDK?  

    Also, can you clarify the following statement?  “I also find out AM57XX_PRU1_UART0_RXD have signal same as TXD but lag when I write data from PRU to another device.” 

    Regards,

    Melissa

  • In reply to melissaw:

    Hi,Melissa

    Thank you for your reply.

    The another device is a ftdi module.I connect AM57XX_PRU1_UART0_TXD and AM57XX_PRU1_UART0_RXD to RXD and TXD of ftdi module respectively.The fidi module is a USB-UART module.I control the ftdi module using USB on computer.So the data flow is : PC->ftdi module -> AM5728 IDK. 

    I connected the scope to AM57XX_PRU1_UART0_TXD and AM57XX_PRU1_UART0_RXD. When I wrote some data signal out from AM57XX_PRU1_UART0_TXD, I saw the AM57XX_PRU1_UART0_RXD, which supposes to be always high,  also sensed the same signal with lag.   

    Best Regards,

    Alex

  • In reply to Alex2020:

    Alex,

    You might try removing R575 and R574 on your IDK. Do you still see AM57XX_PRU1_UART0_RXD mirroring AM57XX_PRU1_UART0_TXD?

    Regards,
    Melissa
  • In reply to Alex2020:

    Alex,

    You can find the updated PRU UART header file on the master branch of the pru-software-support-package here: https://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/include/am572x_2_0/pru_uart.h

    You are creating a new SD card from the 3.2.0.5 Linux RT SDK and your IDK won't boot, correct? Which version of the IDK are you using so I can try to replicate this behavior.

    Jason Reeder

  • In reply to melissaw:

    Hi,Melissa

    Thanks for your reply.

    I followed your guide to remove the R575 and 5574,everything is work!I can receive data and the signal is normal.

    Thank you for your help.

    Best Regards,

    Alex

  • In reply to Jason Reeder:

    Hi, Jason
    Thank you for your reply.

    I used a another SD card and used create-card.sh from 3.3.0.4 Linux RT SDK.I used 3.3.0.4 version IDK.

    Best Regards,
    Alex