Static TaskHandle_t can_task_handle = NULL Static TaskHandle_t rpmsg_task_handle = NULL #define RPMSG_LITE_NS_ANNOUNCE_STRING "rpmsg-virtual-tty-channel" #define RPMSG_LITE_LINK_ID (RL_PLATFORM_IMX8QM_M4_A_USER_LINK_ID) #define RPMSG_LITE_SHMEM_BASE (VDEV1_VRING_BASE) I’m attaching part of my code (with tasks and related variables) to see if you can help me with this and what I might be doing wrong. I thought that removing the timeout from the “rpmsg_queue_recv_nocopy” function (setting it to 0 or a small value) would change this behavior, but the problem with that is that this way the program no longer works in any direction (Linux to CAN or CAN to Linux). The thing is that the way from Linux to CAN works fine, but when I send from CAN, it receives the frame, sets the flag, but never reaches the statement that controls whether the flag is set or not, hence never sends the message to Linux. I use two tasks, one for RPMSG and one for CAN, and I use global flags to let the tasks know when a message has arrived from either Linux or CAN. The idea is to send messages from a Linux container using the virtual ttyRPMSG30 and then send that message over flexCAN and viceversa. I’m running a program which is a mix of the flexcan interrupt transfer and the rpmsg_lite_str_echo_rtos examples found on the MCUXpresso SDK.
0 Comments
Leave a Reply. |