Skip to main content
Alex Mach
Associate II
February 7, 2021
Solved

stm32mp157-dk2 How to enable vdda and vref regulators

  • February 7, 2021
  • 2 replies
  • 1888 views

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.

This topic has been closed for replies.
Best answer by Alex Mach

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.

2 replies

PatrickF
Technical Moderator
February 16, 2021
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.NEW ! Sidekick STM32 AI agent, see here
Alex Mach
Alex MachAuthorBest answer
Associate II
February 24, 2021

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.

PatrickF
Technical Moderator
March 17, 2021

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.NEW ! Sidekick STM32 AI agent, see here