Skip to main content
BillR
Associate III
February 25, 2021
Question

DAC stops working on M4 side shortly after Linux boots.

  • February 25, 2021
  • 2 replies
  • 942 views

This is might save someone the few hours I spent tracking this down. I am wondering if this is a bug. It would seem like a reason that you have m4 sections in the device tree. So linux can be aware not to touch an M4 resource.

Linux shuts off the vdda shortly after booting thinking no one is using vdda and then it seems like the DAC is not working as we control it from M4.

So I am not sure if this is considered a bug or not. The solution is to set vdda as "regulator-always-on"

&m4_dac{
	pinctrl-names = "default";
	pinctrl-0 = <&m4_dac1_pins_mx>;
	status = "okay";
	vref-supply = <&vdda>; // Does not prevent vdda from being shut off.
};

vdda:ldo5{
				regulator-name = "vdda";
				regulator-min-microvolt = <2900000>;
				regulator-max-microvolt = <2900000>;
				interrupts = <IT_CURLIM_LDO5 0>;
				regulator-always-on; // <--added
			};

This topic has been closed for replies.

2 replies

PatrickF
ST Employee
March 1, 2021

Hi,

thanks a lot for your findings.

We are clarifying that internally, but the regulator-always-on; seems the right solution, which seems missing in our wiki.

See this similar post https://community.st.com/s/question/0D53W00000Y4kuGSAR/stm32mp157dk2-how-to-enable-vdda-and-vref-regulators

Regards,

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
PatrickF
ST Employee
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 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent