cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot send VIRT_UART_Transmit as dst is RPMSG_ADDR_ANY

Mario Luzeiro
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

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

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

4 REPLIES 4
Mario Luzeiro
Senior

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

but the Linux side must transmit something first ?

Erwan SZYMANSKI
ST Employee

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
ST Employee

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

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.

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