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.

Linux/AM5728: Migrating C code from BBB to AM572x

Part Number: AM5728


Tool/software: Linux

Hi all,

I have a code for UART transmission and reception, which was finely working with Beaglebone Black(BBB).

Now I am trying to use the same code for AM572x EVM.

For AM572x EVM, I modified the .dts file am57xx-evm.dts and the modified portions are as shown below.

&dra7_pmx_core {
pinctrl-names = "default";
pinctrl-0 = <&board_pins>;

board_pins: pinmux_board_pins {
pinctrl-single,pins = <
0x2E0 0x020E
0x2D8 0x020E
0x74 0x020E
0x88 0x020E

0xC4 0x060E
0xCC 0x060E
0xD8 0x060E
>;
};

uart1_pins: pinmux_uart1_pins {
pinctrl-single,pins = <
0x3E0 (PIN_INPUT_PULLUP | MUX_MODE0)               /* UART1 RXD */
0x3E4  (PIN_OUTPUT_PULLDOWN | MUX_MODE0)   /* UART1 TXD */
>;
};

};

&uart1 {
status="okay";
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
};

Also the code that I am using is started with

ser_fd = open("/dev/ttyS1",O_RDWR | O_NOCTTY);

   if(ser_fd == -1)

   {

      printf("\n  Error! in Opening ttyS1\n");

   }

   else

   {

      printf("\n  ttyS1 Opened Successfully\n");

   }

   tcgetattr(ser_fd, &ser_settings);

   cfsetispeed(&ser_settings,B9600);

   cfsetospeed(&ser_settings,B9600);

Here the file /dev/ttyS1 is opened successfully.

But transmission or reception is not happening.

A I missing something? Or anything wrong?

Any working sample code available for the same?

Thanks for the help.

Thanks & Regards,

Sajeevan.K

  • Hi Sajeevan,

    Which AM335x PSDK you are using for BBB UART programming? On which UART instance (UART0 to UART5) you are working on AM335x BBB? Do you use also IRQ or/and DMA in AM335x BBB UART program?

    Which AM572x PSDK you are using for AM572x EVM UART programming? I see you are using first UART here (UART1), from 10 UARTs available (UART1 to UART10).

    On AM572x EVM, when linux boot up, check if you made the correct pinmux, make that check in user space with omapconf tool or devmem2 tool.

    Regards,
    Pavel
  • Hi Pavel Botev,

    I was not using any particular PSDK for BBB. Common Linux User space software, got from googling only is used.

    Also Derek Molloy's "Exploring Beaglebone" is used as the guide.

    In BBB, I was using UART1 and UART4. Both are working fine.

    In BBB, accessing of devices was done through sysfs.

    For my applications IRQs or DMAs were not used.

    In AM572x, I was trying to make UART1 working.

    mapconf tool or devmem2 tool are something new for me. I need to understand about it and check the AM572x evm with these tools.

    I would test it and give You a feedback within two or three days.

    Thanks & Regards,

    Sajeevan.K

  • Sajeevan,

    See the below pointer regarding omapconf tool usage.

    github.com/.../wiki

    Regards,
    Pavel
  • Hi Pavel,

    Actually our resources are busy in other works.

    And AM572x, is used in one of our product. We have to do this  only after some time.

    After  completing our present assignments, we will come back to this work again, after a period of time.

    We will do a detailed testing at that time as per Your suggestions.

    If still problem is not solved, we shall contact You through the same thread.

    Thank You for Your support.

    Thanks and Regards,

    Sajeevan.K

  • Hi Sajeevan,

    Yes, you can use this thread when new questions come up regarding this issue.

    Regards,
    Pavel