2019-10-28 06:54 AM - last edited on 2023-06-16 09:58 AM by Kevin HUBER
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
Solved! Go to Solution.
2019-11-05 01:23 AM
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
2019-10-29 02:31 AM
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.
2019-10-29 05:22 AM
I have exactly the same problem. Can't solve yet
2019-10-29 05:25 AM
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.
2019-10-29 08:48 AM
Hi all,
Sorry for inconvenience. We will have a look at it .
Olivier
2019-10-29 09:11 AM
Thank you for taking a look at it.
2019-11-02 09:19 AM
I have some problem.
Infinit loop:
while(resource_table.vring1.da != VRING_RX_ADDRESS)
2019-11-04 01:00 AM
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.
2019-11-04 03:49 AM
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 */
}
2019-11-05 01:23 AM
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