Skip to main content
Mario Luzeiro
Associate III
April 13, 2022
Solved

Cannot send VIRT_UART_Transmit as dst is RPMSG_ADDR_ANY

  • April 13, 2022
  • 3 replies
  • 2413 views

I'm following the OpenAMP_TTY_echo example.

To do a Tx it basically uses two functions: VIRT_UART_Init and VIRT_UART_Transmit

After I use VIRT_UART_Init, I can see in the Linux terminal a log message something that suggests the initialization is working.

However, VIRT_UART_Transmit returns error.

I was debugging and found that rpmsg_send_offchannel_raw function is returning because "dst == RPMSG_ADDR_ANY"

However, VIRT_UART_Init, is initializing destiny as RPMSG_ADDR_ANY

status = OPENAMP_create_endpoint(&huart->ept, RPMSG_SERVICE_NAME, RPMSG_ADDR_ANY, VIRT_UART_read_cb, NULL);

These are automatic generated functions by STM32CubeMX.

Am I missing something? Should I set the dest address somehow?

Note this is code generated with STM32CubeMX, I only added the call to VIRT_UART functions.

This topic has been closed for replies.
Best answer by Erwan SZYMANSKI

Maybe you can find similarities on the following topics, that seems to match with your actual issue: https://community.st.com/s/question/0D50X0000BaMkj0SQC/virtuart-or-rpmsg-framework-on-m4-cannot-send-messages-until-a7-host-sends-a-message?topicId=0TO0X0000003u2AWAQ&topicName=STM32%20MPUs

3 replies

Mario Luzeiro
Associate III
April 13, 2022

I found that it may be I should use the function OPENAMP_Wait_EndPointready ?

but the Linux side must transmit something first ?

Erwan SZYMANSKI
Technical Moderator
April 14, 2022

Hello @Mario Luzeiro​,

On which board are you actually working ? Is it the STM32MP157C-DK2 ?

Did you follow this article: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware ?

On Linux side, can you well see in /dev/ folder the two channels created by your M4 firmware ? (ttyRPMSG0 and ttyRPMSG1)

Regards.

Erwan.

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.
Erwan SZYMANSKI
Erwan SZYMANSKIBest answer
Technical Moderator
April 14, 2022
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.
Mario Luzeiro
Associate III
April 14, 2022

Its exactly the same issue, it is "by design", thanks!