Skip to content

Commit f6cd63a

Browse files
committed
Add how to configure virtio buffers
1 parent b1bc859 commit f6cd63a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

variants/STM32MP157_DK/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ When enabled, `/dev/ttyRPMSG0` is available to the Linux host. You can use it as
100100

101101
See [OpenAMP] and [Linux RPMsg] to learn more.
102102

103+
### Configuration
104+
105+
To increase the performance of VirtIOSerial you can resize the related buffer configurations. There are three definitions you can use:
106+
107+
* [`VRING_NUM_BUFFS`](/cores/arduino/stm32/OpenAMP/virtio_config.h)
108+
* [`RPMSG_BUFFER_SIZE`](/cores/arduino/stm32/OpenAMP/virtio_config.h)
109+
* [`VIRTIO_BUFFER_SIZE`](/cores/arduino/stm32/OpenAMP/virtio_buffer.h)
110+
111+
The recommended option is to resize `VRING_NUM_BUFFS`. Be very cautious when resizing `RPMSG_BUFFER_SIZE`, which must be matched with the Linux kernel definition. Also `VIRTIO_BUFFER_SIZE` has the minimum required size depending on the other two. See their links above for further descriptions.
112+
113+
To redefine these definitions, see how to create `build_opt.h` described in Debugging section below.
114+
103115
## Debugging
104116

105117
For printf-style debugging, `core_debug()` is highly recommended instead of using Arduino Serial. In STM32MP1, `core_debug()` utilizes OpenAMP trace buffer and it has a minimal real-time impact (other than the overhead of printf) because it is not bound to the speed of a hardware IO peripheral while printing it.

0 commit comments

Comments
 (0)