Skip to main content
Visitor II
July 30, 2019
Solved

Maximum 4 virtual uarts can be created?

  • July 30, 2019
  • 1 reply
  • 832 views

Hi,

As i was testing the limit of how many virtual uarts i can create, i found that the limit is actually 4:

0690X000009ZdF8QAK.png

Using debug tracing i can see that the channels get created inside the code (here i am creating 5 virtual uart) but only 4 ttyRPMSG are created.

I reduced the total buffer used by each channel to 256 instead of 512:

// File: rpmsg_virtio.h
 
/* Configurable parameters */
#ifndef RPMSG_BUFFER_SIZE
#define RPMSG_BUFFER_SIZE	(256)
#endif

So in theory, i should be able to create 8 channels but the max is 4 apparently.

Can someone please confirm how they made it?

Thanks

    This topic has been closed for replies.
    Best answer by OlivierK

    Hi victor.b 

    Thank you for your post, we discovered there was a bug in the rpmsg.c Cube FW library.

    You should be able to create up to 32 instances of tty like it was originally tailored (( https://github.com/STMicroelectronics/linux/blob/v4.19-stm32mp/drivers/rpmsg/rpmsg_tty.c)

    #define MAX_TTY_RPMSG_INDEX 32 /* Should be enough for a while */

    Please find the fix here:

    https://github.com/OpenAMP/open-amp/commit/efd67b0993d507ce3555f62fe46b414a8a8d4578

    Best Regards,

    Olivier

    1 reply

    OlivierKAnswer
    Technical Moderator
    July 31, 2019

    Hi victor.b 

    Thank you for your post, we discovered there was a bug in the rpmsg.c Cube FW library.

    You should be able to create up to 32 instances of tty like it was originally tailored (( https://github.com/STMicroelectronics/linux/blob/v4.19-stm32mp/drivers/rpmsg/rpmsg_tty.c)

    #define MAX_TTY_RPMSG_INDEX 32 /* Should be enough for a while */

    Please find the fix here:

    https://github.com/OpenAMP/open-amp/commit/efd67b0993d507ce3555f62fe46b414a8a8d4578

    Best Regards,

    Olivier