cancel
Showing results for 
Search instead for 
Did you mean: 

Cortex-M4 is not running In uboot With Rproc commands for stm32mp157a processor.

Sindhu Vadde
Associate III

Hi,

We are using stm32mp157a-dk1 board. In this when we boot Cortex-M4 code with rproc commands in uboot, cortex-M4 is running.

We are using stm32mp157aaa3 processor in my custom board. When we are trying to boot Cortex-M4 in Uboot with rproc commands. It is not running.

When we give rproc init commands we are getting Remote Processors are alread Intialized message on Console.

When we give rproc load command we are getting load failed message on console.

Note:Cortex-M4 is running individually with Jtag and QSPI boot.

How can i boot Cortex-M4 in Uboot With Rproc commands?

You can find in below Attachment for rproc Commands in my custom board.

Please help us in this reagrds.

1 ACCEPTED SOLUTION

Accepted Solutions
Hammy
Associate III

Hi @Sindhu Vadde​ 

What does your &m4_rproc node look like in the device tree? You might be missing the following.

 &m4_rproc{
	status = "okay";
	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
			<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
	mbox-names = "vq0", "vq1", "shutdown", "detach";
	interrupt-parent = <&exti>;
	interrupts = <68 1>;
	wakeup-source;
	st,auto-boot = <1>;
	m4_system_resources {
		status = "okay";
	};
};
 
and
 
reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
 
		mcuram2:mcuram2@10000000{
			compatible = "shared-dma-pool";
			reg = <0x10000000 0x40000>;
			no-map;
		};
 
		vdev0vring0:vdev0vring0@10040000{
			compatible = "shared-dma-pool";
			reg = <0x10040000 0x1000>;
			no-map;
		};
 
		vdev0vring1:vdev0vring1@10041000{
			compatible = "shared-dma-pool";
			reg = <0x10041000 0x1000>;
			no-map;
		};
 
		vdev0buffer:vdev0buffer@10042000{
			compatible = "shared-dma-pool";
			reg = <0x10042000 0x4000>;
			no-map;
		};
 
		mcu_rsc_table: mcu_rsc_table@10048000 {
			compatible = "shared-dma-pool";
			reg = <0x10048000 0x8000>;
			no-map;
		};
 
		mcuram:mcuram@30000000{
			compatible = "shared-dma-pool";
			reg = <0x30000000 0x40000>;
			no-map;
		};
 
		retram:retram@38000000{
			compatible = "shared-dma-pool";
			reg = <0x38000000 0x10000>;
			no-map;
		};
	};

View solution in original post

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @Sindhu Vadde​ ,

refering to How to start the coprocessor from the bootloader - stm32mpu

I don't see elf load step in your screenshot :

" load mmc 0#bootfs ${kernel_addr_r} rproc-m4-fw.elf -> SD card is mmc 0, bootfs partition"

From where do you get the M4 firmware?

Else I read in similar previous post that it was working on DK1 and not on custom device.

Can you share complete M4 start sequence traces ( from initial boot) for working (DK1) and not working ( custom board ) case ?

Can you highlight main differences from HW or SW point of view between your custom board and DK1.

Are you using same memory to store M4 elf ? Same DDR budget ? etc...

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.

Hello,

Thanks for the reply.

Here is the difference in hardware.

-->In Dk1 Board we are using stm32mp157aac processor(crypto/secured).

-->in my custom board we are using stm32mp157aaa processor(Normal).

In Software Point of View:

For both boards

Case 1:

we are taking M4 code from Stm32 cube IDE.

We are coping to same DDR memory. it is working in DK1 board .

First we copied M4 elf to sdcard after we followed below sequence.

1.ext4load mmc 0:4 0xc2000000 M4.elf

2. rproc init

3.rproc load 0 0xc2000000 sizeofbin

4.rproc start 0

Case 2:

We checked cortex-m4 binary file with SRAM and RETRAM trough tftp.

We followed below sequence for this case:

1.tftp 0x10002000 m4.bin

2.cp 0x10002000 0x38000000

3.rproc init

4.rproc load 0 0x38000000 sizeof bin file

5.rproc start 0

Cortex-m4 is working in both cases with DK1 board. Where as with my custom board both cases are not working.

In both cases i am getting Failed message in rproc load command in My custom board.

Note:0x10002000 is SRAM address,0x38000000 RETRAM Address.

Olivier GALLIEN
ST Employee

Hi @Sindhu Vadde​ ,

Case 1 looks fine for me but I'm puzzled by Case 2.

1.tftp 0x10002000 m4.bin -> why .bin and not .elf 
 
2.cp 0x10002000 0x38000000 -> copy from SRAM to RETRAM ? Why not just let rproc load do it ? 
 
3.rproc init 
 
4.rproc load 0 0x38000000 sizeof bin file -> copy from RETRAM to RETRAM ? need step 2 or 4 but not both IMHO did you test "rproc load 0 0x10002000 sizeof bin file" ? 
 
5.rproc start 0

Anyway even if we stick on case 1 I have not much clue to explain.

Could you provide log with working and none working case ( case 1 only ) ?

Did you already try to set log level to 7 to get more traces ?

cf https://wiki.st.com/stm32mpu/wiki/U-Boot_-_How_to_debug#Debug_with_console

Olivier

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

Hi @Sindhu Vadde​ ,

one other comment (even if no matter in your issue ) :

you said : "In Dk1 Board we are using stm32mp157aac processor(crypto/secured)."

No DK1 / stm32mp157aac is a non-crypto reference as specified by the first "a" in the RPN.

See Chapter 8 "Ordering information" in Data Sheet.

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.
Hammy
Associate III

Hi @Sindhu Vadde​ 

What does your &m4_rproc node look like in the device tree? You might be missing the following.

 &m4_rproc{
	status = "okay";
	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
			<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
	mbox-names = "vq0", "vq1", "shutdown", "detach";
	interrupt-parent = <&exti>;
	interrupts = <68 1>;
	wakeup-source;
	st,auto-boot = <1>;
	m4_system_resources {
		status = "okay";
	};
};
 
and
 
reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
 
		mcuram2:mcuram2@10000000{
			compatible = "shared-dma-pool";
			reg = <0x10000000 0x40000>;
			no-map;
		};
 
		vdev0vring0:vdev0vring0@10040000{
			compatible = "shared-dma-pool";
			reg = <0x10040000 0x1000>;
			no-map;
		};
 
		vdev0vring1:vdev0vring1@10041000{
			compatible = "shared-dma-pool";
			reg = <0x10041000 0x1000>;
			no-map;
		};
 
		vdev0buffer:vdev0buffer@10042000{
			compatible = "shared-dma-pool";
			reg = <0x10042000 0x4000>;
			no-map;
		};
 
		mcu_rsc_table: mcu_rsc_table@10048000 {
			compatible = "shared-dma-pool";
			reg = <0x10048000 0x8000>;
			no-map;
		};
 
		mcuram:mcuram@30000000{
			compatible = "shared-dma-pool";
			reg = <0x30000000 0x40000>;
			no-map;
		};
 
		retram:retram@38000000{
			compatible = "shared-dma-pool";
			reg = <0x38000000 0x10000>;
			no-map;
		};
	};

Hi Hammy,

Thanks for the reply.

In our code &m4_rproc is disbaled.Now i enabled the node.

It is working now.