2022-04-13 11:15 AM
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.
Solved! Go to Solution.
2022-04-14 01:58 AM
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
2022-04-13 11:34 AM
I found that it may be I should use the function OPENAMP_Wait_EndPointready ?
but the Linux side must transmit something first ?
2022-04-14 01:34 AM
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.
2022-04-14 01:58 AM
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
2022-04-14 02:04 AM
Its exactly the same issue, it is "by design", thanks!