cancel
Showing results for 
Search instead for 
Did you mean: 

stm32mp157-dk2 How to enable vdda and vref regulators

Alex Mach
Associate III

Hello,

My app running on M4 uses adc. It starting at kernel boot process using systemd. After some time kernel poweroff vdda and vref while my app is running

[  14.173564] remoteproc remoteproc0: powering up m4

[  14.308543] remoteproc remoteproc0: Booting fw image OpenAMP_TTY_echo_CM4.elf, size 2541404

[  14.361095] virtio_rpmsg_bus virtio0: rpmsg host is online

[  14.370223] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty-channel addr 0x0

[  14.389900] mlahb:m4@10000000#vdev0buffer: registered virtio0 (type 7)

[  14.399505] rpmsg_tty virtio0.rpmsg-tty-channel.-1.0: new channel: 0x400 -> 0x0 : ttyRPMSG0

[  14.408052] remoteproc remoteproc0: remote processor m4 is now up

[  14.422284] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty-channel addr 0x1

[  14.455735] rpmsg_tty virtio0.rpmsg-tty-channel.-1.1: new channel: 0x401 -> 0x1 : ttyRPMSG1

[  34.411305] vref: disabling

[  34.413987] vdda: disabling

and my app can't process adc.

So how to prevent disabling vref and vdda?

Thanks,

Alex.

1 ACCEPTED SOLUTION

Accepted Solutions
Alex Mach
Associate III

Hello Patrick,

My dts files include all defines described your link but vref & vdda disabling by kernel. If I run m4 app after this disabling adc works fine (so app enabled vref and vdda).

PS: I've changed regulator-boot-on to regulator-always-on in dts file. It works.

Thanks,

Alex.

View solution in original post

3 REPLIES 3
PatrickF
ST Employee

Hello,

https://wiki.st.com/stm32mpu/wiki/How_to_configure_system_resources#ADC_example will probably help you.

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.
Alex Mach
Associate III

Hello Patrick,

My dts files include all defines described your link but vref & vdda disabling by kernel. If I run m4 app after this disabling adc works fine (so app enabled vref and vdda).

PS: I've changed regulator-boot-on to regulator-always-on in dts file. It works.

Thanks,

Alex.

Hello,

Sorry for late answer.

Seems regulator-always-on is not needed if you enable the resource manager in the DT as stated in the wiki.

As I understand, this will tell Linux to bind M4 resources to remoteproc status to avoid shutting down VDDA if Cortex-M4 is running.

&m4_rproc {
	m4_system_resources {
		status = "okay";
	};
};

Regards,

Patrick

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.