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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @meiss.M​ , @lenonrt​ , @AShca.724​ , all

We have reproduced and analyzed your issues.

Actually there is several depending on your target and IDE.

For all :

A new function PeriphCommonClock_Config(); is generated and has to be commented or put under condition IS_ENGINEERING_BOOT_MODE() like SystemClock_Config();

If using CubeIDE :

You have to remove from project the file CM4/Core/Src/rsc_table.c

This bug will be fixed in next CubeIDE Version.

If using DK1 target :

You have to export in your project setting as compiler preprocessor the variable STM32MP157Cxx

This bug will be fixed in next Cube Package version

Apology for inconvenience,

Please confirm above work around fix all your issues.

BR,

Olivier

Olivier GALLIEN
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.

View solution in original post

13 REPLIES 13
nrg6
Associate II

I have the same problem with STM32CubeIDE 1.1.0. I created a project for the STM32MP157A-DK1 board with default settings. The M4 stucks while OPENAMP init in the function resource_table_init. I have 2.6-openstlinux-4.19-thud-mp1-19-10-09 running on the A7.

0690X00000ArNuNQAV.png

I have exactly the same problem. Can't solve yet

lenonrt
Associate III

I see that have two diferent rsc_table.c files. One in the Core/Src folder and other in the OPENAMP folder. I don't know which one is used.

Olivier GALLIEN
ST Employee

Hi all,

Sorry for inconvenience. We will have a look at it .

Olivier

Olivier GALLIEN
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.
meiss.M
Associate III

Thank you for taking a look at it.

AShca.724
Associate

I have some problem.

Infinit loop:

while(resource_table.vring1.da != VRING_RX_ADDRESS)

Bumsik Kim
Senior

I didn't use CubeMX-generated code but the same thing happened in my case.

I fixed that by adding a proper IPCC interrupt handler.

I suggest you guys to double-check if the IPCC handler is added.

lenonrt
Associate III

Hi,

Can you show some code?

It's the interruptions in the "stm32mp1xx_it.c" file?

/**
  * @brief This function handles IPCC RX1 occupied interrupt.
  */
void IPCC_RX1_IRQHandler(void)
{
  /* USER CODE BEGIN IPCC_RX1_IRQn 0 */
 
  /* USER CODE END IPCC_RX1_IRQn 0 */
  HAL_IPCC_RX_IRQHandler(&hipcc);
  /* USER CODE BEGIN IPCC_RX1_IRQn 1 */
 
  /* USER CODE END IPCC_RX1_IRQn 1 */
}

Olivier GALLIEN
ST Employee

Hi @meiss.M​ , @lenonrt​ , @AShca.724​ , all

We have reproduced and analyzed your issues.

Actually there is several depending on your target and IDE.

For all :

A new function PeriphCommonClock_Config(); is generated and has to be commented or put under condition IS_ENGINEERING_BOOT_MODE() like SystemClock_Config();

If using CubeIDE :

You have to remove from project the file CM4/Core/Src/rsc_table.c

This bug will be fixed in next CubeIDE Version.

If using DK1 target :

You have to export in your project setting as compiler preprocessor the variable STM32MP157Cxx

This bug will be fixed in next Cube Package version

Apology for inconvenience,

Please confirm above work around fix all your issues.

BR,

Olivier

Olivier GALLIEN
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.