cancel
Showing results for 
Search instead for 
Did you mean: 

No virtual UART device is generated & M4 gets stuck while initializing openamp

meiss.M
Associate III

Hello,

previously, I had no problem setting up the virtual UARTs in the the Ac6 IDE using STM32CubeMX 5.3.0. With the new 5.4.0, the OpenAMP initialization change a bit so, obviously I enabled in the openamp_conf.h the UART HAL module driver (virt_uart.c).

 

With the generated code (Cube 5.4.0) the openamp initalization hangs the M4 when executing MX_OPENAMP_Init(). :

/* MCU Configuration--------------------------------------------------------*/
 
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
 
  /* USER CODE BEGIN Init */
	__HAL_RCC_HSEM_CLK_ENABLE();
  /* USER CODE END Init */
 
  /* Configure the system clock */
  SystemClock_Config();
 
  /* IPCC initialisation */
   MX_IPCC_Init();
  /* OpenAmp initialisation ---------------------------------*/
  MX_OPENAMP_Init(RPMSG_REMOTE, NULL);

What are the possibilities to debug this? I suspect, the CM4 cannot connect to the CA7. Thank you very much.

Thread #1 (Suspended : Signal : SIGINT:Interrupt)	
	metal_io_read() at io.h:223 0x10009a88	
	rproc_virtio_get_status() at remoteproc_virtio.c:66 0x10009c6e	
	rproc_virtio_wait_remote_ready() at remoteproc_virtio.c:326 0x10009f40	
	MX_OPENAMP_Init() at openamp.c:120 0x1000b7f6	
	main() at main.c:113 0x10000aa8	
	Reset_Handler() at startup_stm32mp157cacx.s:98 0x1000ccde

 

 

 

13 REPLIES 13
lenonrt
Associate III

Hi @Community member​ !

That work solve my issues.

Thank you!

Lenon

Hi Oliver,

this workaround works for me for a default project on DK1 target. I added RESMGR_UTILITY and USART3 and it is still working. But when i add FREERTOS and switch Timebase Source to TIM7, it ends up in HardFault_Handler. I have implemented CoproSync_ShutdownCb from the examples, but this has no effect.

I need a running soucecode base with OpenAMP, FreeRTOS and USART3.

meiss.M
Associate III

Thank you very much. In the meantime I also have managed to move to cubeIDE 1.1.0, and with the suggested modifications it now works. It would be nice to have the openamp code in the middleware directory separated from any ST code, so it is separated from the official code e.g. openamp on github.

The directory structure of the Cube 5.4 generated code for the A7 and M4 is nice.

Many greetings, Markus

Thanks Oliver,

if (IS_ENGINEERING_BOOT_MODE()) SystemClock_Config();

and

removing CM4/Core/Src/rsc_table.c

worked for me with CubeIDE 1.1.0 on stm32MP157C-DK2

Best regards,

Paul.