VIRT_UART (or RPMsg framework) on M4 cannot send messages until A7 host sends a message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-07 5:26 PM
While I'm modifying the code of OpenAMP Echo, I found that VIRT_UART_Transmit() fails until host Linux sends any message (like $ echo "A" > /dev/ttyRPMSG0).
After Linux send a message everything works as expected.
After digging into it a little bit, I found that OPENAMP_send() returns RPMSG_ERR_ADDR, because huart->ept.dest_addr is set to RPMSG_ADDR_ANY when initialized in OPENAMP_create_endpoint().
When the first message received ept->dest_addr is corrected and VIRT_UART_Transmit() starts working fine: https://github.com/STMicroelectronics/STM32CubeMP1/blob/3739122ec3281ffe18356774ffc06a7fbcf6df98/Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg_virtio.c#L423
I'm not sure if OpenAMP is designed like that, or a bug though. Does anyone know about this issue? If it is expected, I would like to know a proper way to send data from M4 first.
Solved! Go to Solution.
- Labels:
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-08 12:33 AM
I asked about it in OpenAMP project directly and they said it is an intentional design decision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-08 12:33 AM
I asked about it in OpenAMP project directly and they said it is an intentional design decision.
