Skip to main content
Visitor II
October 25, 2022
Question

initilize ttyRPMSG0 and ttyRPMSG1

  • October 25, 2022
  • 2 replies
  • 3455 views

Hello!

I am trying to replicate the workshop STM32MP1 - 11 Inter-Processor Communication Lab Example. I create a new STM32 project and copy all the data from the lab example. Then I connect the device (STM32MP157C-DK2) but the /dev/ttyRPMSG0 does not initialize (so I can´t send message between processors):

  • My program

0693W00000UolVfQAJ.png

  • STM32MP1 - 11 Inter-Processor Communication Lab Example

 0693W00000UolVuQAJ.pngI create my program in STM32CubeIDE version 1.10.1.

How can I initilize ttyRPMSG0 and ttyRPMSG1?

Thanks!

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    October 26, 2022

    Hello @TArre.1​,

    Some questions to better understand your issue.

    Which version of OpenSTLinux do you use ? 4.0 ?

    In your example, does it mean that you cannot see ttyRPMSGX in "/dev/" folder from Linux side ?

    Kind regards,

    Erwan.

    (PS: note that coprocessor communication mechanism has a little bit changed with OSTL4.0, so if you use it, be sure to have the right M4 firmware package in front of your A7 Linux baseline)

    TArre.1Author
    Visitor II
    October 26, 2022

    I am using OpenSTLinux 4.0.1 version.

    Exactly. I initialize in main.c program (in STM32CubeIDE) the vitual uarts:

      huart0.rvdev = &rvdev;

      print_string("Virtual UART0 OpenAMP-rpmsg channel creation\r\n");

      if (VIRT_UART_Init(&huart0) != VIRT_UART_OK) {

       print_string("VIRT_UART_Init UART0 failed.\r\n");

       while(1){}

      }

      huart1.rvdev = &rvdev;

      print_string("Virtual UART1 OpenAMP-rpmsg channel creation\r\n");

      if (VIRT_UART_Init(&huart1) != VIRT_UART_OK) {

       print_string("VIRT_UART_Init UART1 failed.\r\n");

      while(1){}

      }

    Then, I run .elf file on the STM32MP157C-DK2 board but in "/dev/" folder I cannot see ttyRPMSGX.

    How can I do it?

    Thanks!

    Technical Moderator
    October 26, 2022

    @TArre.1​ ,

    On a personal example of co-processor communication, I have exactly the same logs as yours so it seems that the initialization logs are normal.

    Can you share me your main.c file (from M4 side) ? I would like to check if something is going wrong somewhere.

    Do you also know the Cube Firmware package version that you are using ?

    Kind regards,

    Erwan.

    Technical Moderator
    October 26, 2022

    A simple test that you can do is to open your virt_uart.c file (Middlewares/Third_Party/OpenAMP/virtual_driver), and check that you have the following line at lines 48-49:

    /* this string will be sent to remote processor */
    #define RPMSG_SERVICE_NAME "rpmsg-tty"

    If you do not see it, for sure you do not have the right version of this file, and it causes the same trouble as you can see right now.

    Kind regards,

    Erwan.