cancel
Showing results for 
Search instead for 
Did you mean: 

Clean shutdown of M4 core

csys
Associate

Hello all,

The startup of the M4 core is easy enough, echoing "start" to the state enables the core.

Shutdown is also simple, echoing "stop" to halt the coprocessor. However on shutdown, peripherals such as the PWM sometimes end in a high state. For my application this is unacceptable. Before shutdown I would like to disable these peripherals and drive them low. This page indicated the IPCC mailbox is used to inform the processor, without giving any implementation details. After looking for the IPCC documentation on this, I have not found anything that describes a shutdown channel, or message. Can someone point me towards documentation on this? Going further, are there any examples of a clean shutdown of the M4 core anywhere?

TIA.

3 REPLIES 3
Erwan SZYMANSKI
ST Employee

Hello @csys ,
From what I understand, you would like to stop your M4 program in a clean way, to stop properly your application running on it such as your PWM management. 

I think that setting up a communication between M4 and A7 cortex like you mentioned it could lead to a clean main loop escape, passing through your own stop procedure.

On this wiki page 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 you will find an example of program named OpenAMP_tty_echo_CM4, available in the STM32_Cube_FWMP1. It will show you how you can communicate between each core, and then setup your own communication protocol.

I hope it will help you to go forward.

Kind 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.

Hello Erwan, thank you for replying.

I understand where you're coming from, unfortunately what you seem to be recommending is recreating the functionality with the virtual UART. I want to use the functionality as described in the document I linked. Are you aware of any documentation that discusses the shutdown message in IPCC?

Thanks

Hi @csys 

Not a SW expert, but I think that as OPENAMP and RPMsg are using IPCC, you have all you need out of the box.

https://wiki.st.com/stm32mpu/wiki/Coprocessor_management_overview

Otherwise, you probably need to create an M4 IPCC SW and maybe a dedicated Linux client to play with Mailbox Framework.

In your application, I guess OpenAMP and RPMsg allows bidirectional communication with the M4 coprocessor which should be handy for debug, status or control from Linux.

Regards.

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.