From 4d35c60ba6d1739a20d72f1ed28c0c6b6b4417b3 Mon Sep 17 00:00:00 2001 From: liaoao Date: Tue, 20 Aug 2024 19:27:00 +0800 Subject: [PATCH] rpmsg_port_spi: set mreq to high to trigger next transmission rpmsg_port_spi_connect can not be used here because peer may have not finished the last transmission which will keep the sreq gpio in high level, and it will read an error data frame. Signed-off-by: liaoao --- drivers/rpmsg/rpmsg_port_spi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_port_spi.c b/drivers/rpmsg/rpmsg_port_spi.c index dabba7b005..8514a9ea6e 100644 --- a/drivers/rpmsg/rpmsg_port_spi.c +++ b/drivers/rpmsg/rpmsg_port_spi.c @@ -365,7 +365,10 @@ rpmsg_port_spi_process_packet(FAR struct rpmsg_port_spi_s *rpspi, if (!rpspi->connected) { rpmsg_port_unregister(&rpspi->port); - rpmsg_port_spi_connect(rpspi); + + /* Trigger a transmission for reconnection */ + + IOEXP_WRITEPIN(rpspi->ioe, rpspi->mreq, 1); } else {