cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum 4 virtual uarts can be created?

victor.b
Associate II

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 discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
OlivierK
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
OlivierK
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.