hello,
RT, in the imx8qm, how does the scu interact with m4 or Acore?
In the m4 SDK, it can be seen that m4 communicates with the scu by the following APIs:
1.sc_misc_set_control ();
2.sc_misc_get_control ();
The api1: sc_misc_set_control ();After testing, the communication between m4 and scu can be realized.
Now, I want the scu would reply to m4 when it receives the message from m4. Similar logic has not been found in the SDK....so, I want to ask how does scu send messages to m4 ? Can you provide the demo?
Hi livan
scu interacion is described in sect.2.2 System Controller Linux Manual
included in Linux 4.19.35_1.1.0 Documentation
and in SCFW Porting Kit
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi,igorpadykov
First of all, thank you for your quick reply!
According to the documentation, the scu interacts with m4 primarily through ipc. In the scfw_api,the communication function is found:
1.ipc_read();
2.ipc_write();
Through these functions, the communication link from m4 to scu can be realized. However, the communication from scu to m4 failed. Can you provide a more detailed example of communication from scu to m4?
BR,
liwan special.
Hope it will be useful to you @189659318
"Now, I want the scu would reply to m4 when it receives the message from m4. Similar logic has not been found in the SDK." - Let's consider a FreeRTOS example for M4 cores:
IPC uses MU that is bi-directional connections, thus, the protocol that is used always works as a following:
M4/AP cores : ipc_write(some command)
SCU ipc_handler:
-----SCU ipc_read(cmd) - > perform command
-----SCU ipc_write(result)
M4/Ap core result =ipc_read()
Take a look at
SCU platform/svc/misc/rpc_clnt.c : sc_misc_set_control it calls sc_call_rpc